Nginx遇上Access Denied提示怎么解决

高分请教一下,Nginx遇上Access Denied提示怎么解决
最新回答
四叶草紫丁香

2024-04-20 20:47:37

检查你的ng配置:
server {
listen 80;
server_name localhost;
root /extra/htdocs/default;
index index.html index.php

access_log /extra/logs/default/access.log;
error_log /extra/logs/default/error.log;

location / {
try_files $uri $uri/ /index.html;
}

location ~ \.php
{
fastcgi_split_path_info ^(.+\.php)(/.+)$;

include fastcgi_params;

fastcgi_index index.php;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}

如果配置里面有fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;就会出现这个问题,对照检查一下吧
活给自己看

2024-04-20 18:31:49

检查你的ng配置: server { listen 80; server_name localhost; root /extra/htdocs/default; index index.html index.php access_log /extra/logs/