cccc 发表于 2024-1-4 21:10:58

【待反馈】伪静态保持出错

为了能快速了解并处理您的问题,请提供以下基础信息:面板、插件版本:8.0.5
系统版本:linux
问题描述:nginx伪静态规则填写后保持提示错误   伪静态规则是server {    listen 80 default_server;    server_name example.com www.example.com;    access_log /srv/www/example.com/logs/access.log;    error_log /srv/www/example.com/logs/error.log;    root /srv/www/example.com/public;    index index.php index.html;    # serve static files directly    location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ {      access_log off;      expires max;      log_not_found off;    }    # removes trailing slashes (prevents SEO duplicate content issues)    if (!-d $request_filename)    {      rewrite ^/(.+)/$ /$1 permanent;    }    # enforce NO www    if ($host ~* ^www\.(.*))    {      set $host_without_www $1;      rewrite ^/(.*)$ $scheme://$host_without_www/$1 permanent;    }    # unless the request is for a valid file (image, js, css, etc.), send to bootstrap    if (!-e $request_filename)    {      rewrite ^/(.*)$ /index.php?/$1 last;      break;    }    location / {      try_files $uri $uri/ /index.php?$query_string;    }    location ~* \.php$ {      try_files $uri = 404;      fastcgi_split_path_info ^(.+\.php)(/.+)$;      fastcgi_pass unix:/var/run/php8.0fpm.sock; # may also be: 127.0.0.1:9000;      fastcgi_index index.php;      fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;      include fastcgi_params;    }    location ~ /\.ht {      deny all;    }}


相关截图(日志、错误):保持伪静态的时候提示

大炮运维V587 发表于 2024-1-5 10:03:16

您好,您打码的这个网站的重定向你看下是不是有错误或者跟你的伪静态配置冲突了

cccc 发表于 2024-1-5 14:13:00

大炮运维V587 发表于 2024-1-5 10:03
您好,您打码的这个网站的重定向你看下是不是有错误或者跟你的伪静态配置冲突了 ...

没用重定向我也把.htaccess删除了,但是就是不行 ,nginx环境添加这个伪静态规则就出错,不管是哪个源码的伪静态规则,只要有sever这个就直接报错

大炮运维V587 发表于 2024-1-5 14:58:41

cccc 发表于 2024-1-5 14:13
没用重定向我也把.htaccess删除了,但是就是不行 ,nginx环境添加这个伪静态规则就出错,不管是哪个源 ...

打码的那个网站,你看看,就是这个网站的重定向配置有错误导致的,或者你删掉这个网站的重定向后,重启Nginx是否报错?
页: [1]
查看完整版本: 【待反馈】伪静态保持出错