[code]
server {
listen 80;
server_name example.com;
root /usr/local/www;
index index.php index.html index.htm;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/local/www/nginx-dist;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/fastcgi.socket;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
[/code]
Часть nginx.conf
При попытке открыть файл в корневой директории проблем нет (прим. http://62.109.1.207/index.html)
Но если попробовать открыть папку (прим. http://62.109.1.207/nginx-dist), то идет перенаправление на хост, указанный в server_name