Welcome! Log In Create A New Profile

Advanced

Re: sites overlap in a EC2 server

Francis Daly
March 20, 2016 05:02PM
On Sun, Mar 20, 2016 at 09:07:58AM -0400, ndrini wrote:

Hi there,

> If only ndrini.eu is enabled, the ndrini.eu site works all right,
> but if I enable also dradambrosio.eu, the first also stops to work.
>
>
> These are my settings:
>
> ndrini.eu
>
> server {
> listen 80;
> server_name *.ndrini.eu;

http://nginx.org/r/server_name

This sever_name will match www.ndrini.eu. but will not match ndrini.eu.

> dradambrosio.eu
>
> server {
> listen 80;
> server_name *.dradambrosio.eu;

And this one will match www.dradambrosio.eu but will not match
dradambrosio.eu.

If you make a request for a server_name which does not match, then the
default server for the appropriate ip:port is chosen.

> Can someone tell me why and how to fix it?

My guess is that you are testing with a request for a url like
http://dradambrosio.eu/, which you do not explicitly configure for.

In that case, remove the "*".

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

sites overlap in a EC2 server

ndrini March 20, 2016 09:07AM

Re: sites overlap in a EC2 server

B.R. March 20, 2016 09:18AM

Re: sites overlap in a EC2 server

Francis Daly March 20, 2016 05:02PM

Re: sites overlap in a EC2 server

ndrini March 20, 2016 06:12PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 89
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready