403试图访问我的简单testing页时禁止
我刚刚安装了nginx,我试图设置我的第一个网站。 我试图用php-fpm来使用nginx。 nginx安装(当我去我的IP我得到默认的欢迎页面)。 现在我正试图获得一个简单的脚本运行: <?php phpinfo(); 但我一直打403页禁止页面。 在我的虚拟主机的日志中,我可以看到很多行: 2012/05/18 01:29:45 [error] 4272#0: *1 access forbidden by rule, client: x.170.147.49, server: example.com, request: "GET / HTTP/1.1", host: "example.com" 该文件是/srv/www/test/index.php其中nginx是所有者(我去了包括文件的完整path无效)。 我已经检查了nginx确实在configuration中运行在用户和组nginx/nginx下。 在nginx.conf中,我已经改变了默认configuration包含path,以确保没有其他configuration( include /etc/nginx/sites-enabled/ )。 我正在使用的configuration看起来像(如果您需要其他configuration(php-fpm / nginx.conf),请让我知道): server { listen 80; server_name example.com; root /srv/www/test; access_log /var/log/nginx/example-access.log; error_log /var/log/nginx/example-error.log error; location ~ /. { access_log off; […]