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
f
a
s
t
c
g
i
s
c
r
i
p
t
n
a
m
e
;
i
f
(
fastcgi_script_name; if (
fastcgiscriptname;if(fastcgi_script_name ~ “^(.+?.php)(/.+)$”) {
set $real_script_name $1;
set $path_info $2;
}
fastcgi_param SCRIPT_FILENAME
d
o
c
u
m
e
n
t
r
o
o
t
document_root
documentrootreal_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代码,但是解决不了`