this one is weird, because I don't have any error messages.
I have a very basic default file:
server {
#listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default ipv6only=on; ## listen for ipv6
root /var/www;
index index.html index.htm index.php;
# Make site accessible from http://localhost/
server_name localhost;
access_log /var/log/nginx/default.access_log;
error_log /var/log/nginx/default.error_log warn;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to index.html
try_files $uri $uri/ /index.html;
}
location /doc {
root /usr/share;
autoindex on;
allow 127.0.0.1;
deny all;
}
location /images {
root /usr/share;
autoindex off;
}
Now, in shell,
ping localhost
is fine.
However, in any browser, it displays an error. Chrome, for instance says: "Oops! Google Chrome could not find localhost".
127.0.0.1 on the other hand works in browsers.
Maybe you know where should I check for errors? Nothing in /var/log and other files are clean....