**tp5做的網站掛到nginx伺服器的上線環境,結果點選頁面連結,都報404錯誤**

Msaing發表於2019-03-20

tp5做的網站掛到nginx伺服器的上線環境,結果點選頁面連結,都報404錯誤

  我在網上找了很多解決方案,但是都解決不了,他的伺服器掛的網站都是用的織夢二次開發的,這是第一次用tp5的網站,所以出問題了
  server {
listen       80;
server_name *.zx.rtstuf.com;
server_name *.zm.wdszsgs.com;
root /www/wwwroot/zx.rtstuf.com/TP5/public;

add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";

index index.html index.htm index.php;

charset utf-8;

location / {
if (!-e KaTeX parse error: Expected '}', got 'EOF' at end of input: … rewrite ^(.*) /index.php?s=KaTeX parse error: Expected 'EOF', got '}' at position 56: … }̲ … {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
set $real_script_name fastcgiscriptname;if(fastcgi_script_name; if (fastcgi_script_name ~ “^(.+?.php)(/.+)$”) {
set $real_script_name $1;
set $path_info $2;
}
fastcgi_param SCRIPT_FILENAME documentrootdocument_rootreal_script_name;
fastcgi_param SCRIPT_NAME $real_script_name;
fastcgi_param PATH_INFO $path_info;
}

location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt  { access_log off; log_not_found off; }

error_page 404 /index.php;

location ~ /\.ht {
	deny all;
}

ssl_session_cache    shared:SSL:1m;
ssl_session_timeout  5m;

ssl_ciphers  HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers  on;	

}
這是通過自己找的,寫的nginx.conf裡的server程式碼,但是解決不了`

相關文章