Welcome! Log In Create A New Profile

Advanced

example.com is found, but not www.example.com

May 17, 2015 07:32PM
Well this looks so simple in the nginx manual. I have cleared the browser cache. so I am running out of simple idea. The domain is inplanesight.org.
http://www.inplanesight.org will 404
http://inplanesight.org works fine

Here is the server part of the nginx.conf file:
---------------------------------------------------------------
server {
listen 80;
server_name inplanesight.org www.inplanesight.org;

#charset koi8-r;

#access_log logs/host.access.log main;
access_log /var/log/nginx/access.log;

root /usr/local/www/nginx;
location / {
try_files $uri $uri/ =404;
}

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/local/www/nginx-dist;
}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}

location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
include fastcgi_params;
}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}

If it matters, I have two active server sections in the nginx.conf file. This is the start of the second section:
-----------------------------------------------
server {
listen 80;
server_name lazygranch.xyz www.lazygranch.xyz;
-----------------------------------
Subject Author Posted

example.com is found, but not www.example.com

gariac May 17, 2015 07:32PM

Re: example.com is found, but not www.example.com

Reinis Rozitis May 17, 2015 07:56PM

Re: example.com is found, but not www.example.com

Nikolaj Schomacker May 18, 2015 02:08AM

Re: example.com is found, but not www.example.com

B.R. May 18, 2015 05:12AM

Re: example.com is found, but not www.example.com

gariac May 18, 2015 06:26PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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