sites overlap in a EC2 server
Francis Daly
francis at daoine.org
Sun Mar 20 20:59:59 UTC 2016
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 at daoine.org
More information about the nginx
mailing list