欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

**tp5做的网站挂到nginx服务器的上线环境,结果点击页面链接,都报404错误**

程序员文章站 2022-06-05 15:56:42
...

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代码,但是解决不了`

相关标签: 求解决