有新安装的nginx。它在localhost上丢弃了403错误。试图制作任何虚拟主机,但出现同样的问题。有同样的错误。尝试了几天不同的配置 - 没办法。正如我验证的那样 - 我对/ var / www有正确的权限。有我的nginx.conf
user root;
worker_processes 4;
pid /var/run/nginx.pid;
events {
worker_connections 768;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip on;
gzip_disable "msie6";
server {
listen 80;
listen [::]:80 default ipv6only=on;
server_name localhost;
root /var/www;
index index.html index.htm index.php;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:7777;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_buffers 256 128k;
fastcgi_connect_timeout 300s;
fastcgi_send_timeout 300s;
fastcgi_read_timeout 300s;
include fastcgi_params;
}
}
}
我该怎么做?