Do you put all your virtual host info in nginx.conf?
cliff at develix.com
Wed Feb 18 11:08:34 MSK 2009
On Wed, 2009-02-18 at 15:56 +0800, Max wrote:
> I just wonder it will be more difficult if I want to change things
> for multiple sites (multiple virtual conf files). For example, if I
> want to change ip from 22.214.171.124 to 126.96.36.199, I just open
> the nginx.conf and so a search and replace, it will be replaced them
> all at once. If it's in multiple virtual file, I need to open those
> doamins which are using 188.8.131.52 and chagne them manually.
Use the "map" directive to map domain names to IP addresses. That is
stored in its own file, mappings.conf. Then each domain gets its own
conf file that is included.
This way, to change an IP address, you only need to edit the
> On Wed, Feb 18, 2009 at 1:43 PM, Joe <frumentius at gmail.com> wrote:
> Yes, that's the best way to configure it.
> On Wed, Feb 18, 2009 at 12:31 PM, Nick Pearson
> <nick.pearson at gmail.com> wrote:
> The best way is to include separate config files using
> the include directive:
> On Tue, Feb 17, 2009 at 11:22 PM, Max
> <maxbear at gmail.com> wrote:
> Do you put all your virtual host info in
> nginx.conf? Since I got a lot of virtual
> hosts, if I put all of them into nginx.conf, I
> found it's rather big. Just want to know
> what's the best practice to handle many
> virtual hosts. Thanks.
More information about the nginx