在raspbian上,我无法使用nginx铬打开本地主机上的index.php文件。
我在www.conf中更改了监听:listen = 127.0.0.1:9000
,以匹配在nginx配置中监听的服务器。
和我的默认文件看起来像(上面列表中还包括index.php):
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
include snippets/fastcgi-php.conf;
#
# # With php7.0-cgi alone:
# fastcgi_pass 127.0.0.1:9000;
# # With php7.0-fpm:
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}