Nginx.conf 404-571错误

时间:2018-08-13 16:03:43

标签: php nginx

我需要访问users文件夹内的php文件。但出现404-571错误。我在哪里错了

server{
listen 80 default_server;
root /home/ubuntu/public/;
location / {index  index.html index.php;}


access_log  /var/log/nginx/host.access.log  main

location ~*/pb(.*){
root /pb/api/users;

location ~ \.php$ {
try_files        $uri =404;
fastcgi_pass     fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_param    SCRIPT_FILENAME $document_root$fastcgi_script_name;
include          fastcgi_params;
}

location ~ \.php$ {
try_files        $uri =404;
fastcgi_pass     fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_param    SCRIPT_FILENAME $document_root$fastcgi_script_name;
include          fastcgi_params;

}
location ~ /\.ht { deny  all;}
}

该错误可能是在ubuntu v16上运行的原因

0 个答案:

没有答案