Nginx to server secure and not secure traffic

Priority1 nginx-forum at
Mon Oct 1 19:33:30 UTC 2012

hsrmmr Wrote:
> My question is :
> 1. Does Nginx always picks the first server from the config ...
> irrespective of what client has requested and passes to  proxy
> (php-fpm)?

First is actually the server name, and others - is just aliases.
If you want to send requested hostname to backend - use $hostname instead.

> 2. We have a lot of rules, so if we create two separate server (as per
> following) do I need to copy the rules in both places? It there any
> maintainable way, like 'include /common_rules.conf'?  

Yes you can.
Just "include conf/share_config.conf;"

Posted at Nginx Forum:,231295,231297#msg-231297

More information about the nginx mailing list