Unique server for all domains or a server per domain?

B.R. reallfqq-nginx at yahoo.fr
Thu Feb 9 01:00:29 UTC 2012

OK, received loud and clear!

Many thanks,
*B. R.*

On Wed, Feb 8, 2012 at 19:58, Max <nginxyz at mail.ru> wrote:

> 09 февраля 2012, 04:03 от "B.R." <reallfqq-nginx at yahoo.fr>:
> > I am currently using a unique server conf for all my domains.
> > When I wanna restrain certain activity to certain domains
> (subdirectories,
> > URL rewriting, etc.) I do not have other choice than using 'if' on the
> > $host variable leading to some complications due to the unreliable nature
> > of the 'if' clause.
> > The directory from which the content is served is determined by the
> > hostname.
> >
> > On the other side, is using several servers to listen on several domains
> > the best solution?
> Using separate per-domain server configuration blocks is both
> more efficient and easier to configure and maintain. Using a
> single server configuration block for many domains requires
> many "if" blocks, which are computationally intensive to
> evaluate, so you should avoid using them whenever possible.
> Most of the time you'll be using "if" blocks for rewrites,
> so it's better to just use separate server configuration
> blocks with direct rewrites.
> Max
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20120208/dd5ba951/attachment.html>

More information about the nginx mailing list