nginx:*21 FastCGI sent in stderr: "Primary script unknown"
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash

·
linux 下php-fpm+nginx 浏览器访问php页面,报file not found
后台nginx 报错:*21 FastCGI sent in stderr: "Primary script unknown"
可能的原因是:
location ~ ^/.*\.php$
这段中,用alias代替了root
修改前:
location ~ ^/.*\.php$ {
alias /usr/share/nginx/xxxxxx;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
修改后:
location ~ ^/.*\.php$ {
root /usr/share/nginx/;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}




A beautiful web dashboard for Linux
最近提交(Master分支:18 天前 )
186a802e
added ecosystem file for PM2 5 年前
5def40a3
Add host customization support for the NodeJS version 5 年前
更多推荐
所有评论(0)