Welcome! Log In Create A New Profile

Advanced

Re: Multiple server_name entries not working

May 30, 2011 10:08PM
On Tue, May 31, 2011 at 02:14:04AM +0100, gvim wrote:
> Nginx 1.0.3
>
> I have a virtual host file with a simple config:
>
> server {
> listen 8080;
> server_name domain.com www.domain.com;
> root /var/www/html/dm2011/pub;
> access_log /var/log/nginx/access.log main;
>
> location / {
> index index.htm index.html;
> }
> }
>
> Requests for 'domain.com' return the correct index page but requests for 'www.domain.com' return only the "Welcome to nginx!" page. I tried *.domain.com also as the 2nd name but the result was the same. There are no DNS issues with both versions of the domain.

If you set
server_name domain.com www.domain.com;
what does "nginx -t" show ?


--
Igor Sysoev

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

Multiple server_name entries not working

gvim May 30, 2011 09:16PM

Re: Multiple server_name entries not working

Igor Sysoev May 30, 2011 10:08PM

Re: Multiple server_name entries not working

gvim May 30, 2011 10:36PM

Re: Multiple server_name entries not working

Ensiferous May 31, 2011 07:50AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 168
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