Mixed Virtualhosts and IP hosts

mike mike503 at gmail.com
Sun Aug 31 11:32:00 MSD 2008


On 8/31/08, Igor Sysoev <is at rambler-co.ru> wrote:

> I have found the case that will not work: in the following configuration
> all requests to 80 port will go to one server only, despite the Host header:
>
> http {
>     server {
>        listen 80;
>        server_name  one;
>     }
> }
>
> http {
>     server {
>        listen 80;
>        server_name  two;
>     }
> }
>
> So several http{} sections are not supported configuration.

That makes sense, this seemed logical because it was a different port.
It does seem to work though, but server {} allows for a different port
anyway, so I think I don't even need it.





More information about the nginx mailing list