Nginx-Primary script unknown的報錯的解決方法


配置nginx時一直報錯:file not found

錯誤日志:

[error] 12691#0: *6 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.168.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.168.133"

改成下面的配置恢復正常,/datao/htdocs/thinkphp為根目錄

{ listen 80; server_name www.tp.com; access_log /data1/logs/tp_access.log myformat; index index.html index.htm index.php; root /datao/htdocs/thinkphp; location ~ \.php { fastcgi_index index.php; fastcgi_pass 127.0.0.1:9000; include fastcgi_params; set $path_info ""; set $real_script_name $fastcgi_script_name; if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") { set $real_script_name $1; set $path_info $2; } fastcgi_param SCRIPT_FILENAME /data0/htdocs/thinkphp/$real_script_name; fastcgi_param SCRIPT_NAME $real_script_name; fastcgi_param PATH_INFO $path_info; } } 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



猜您在找 Nginx報Primary script unknown的錯誤解決 CentOS 7 + Nginx 1.6.2 + PHP 5.4.45 FastCGI錯誤Primary script unknown網頁顯示File not found的解決辦法 vue 報錯unknown custom element解決方法 [轉]vue啟動項目報錯:npm ERR! missing script: serve解決方法 navicat報錯2005 - Unknown MySQL server host 'localhost' (0) 原因及解決方法 crontab -e 報錯 E518: Unknown option: autochdir 解決方法 Nginx 報錯 504 Gateway Time-out 的解決方法 nginx 啟動報錯 “/var/run/nginx/nginx.pid" failed” 解決方法 Warning: mysqli_connect(): The server requested authentication method unknown to the client [caching_sha2_password]報錯解決方法 Vue直接引用