Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
287 views
in Technique[技术] by (71.8m points)

typecho在PHP7.1下点击文章标题无法进入文章

  • 站点链接:http://roamer.cc

  • 故障现象:点击文章链接,不会进入文章本身

  • env:php7.1+nginx1.10+postgresql9.6

nginx配置如下

server {
        listen 80 ;
        server_name roamer.cc;
        return 301 https://$host$request_uri;
        }

server {
        listen 443 ssl;
        ssl_certificate /etc/letsencrypt/live/roamer.cc/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/roamer.cc/privkey.pem;
        root            /home/www/roamercc/;
        index           index.html index.htm index.php;
        if (!-e $request_filename) {
            rewrite ^(.*)$ /index.php$1 last;
        }
        location ~ .*.php(/.*)*$ {
            fastcgi_pass  127.0.0.1:9000;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            fastcgi_index  index.php;
             include       fastcgi_params;
        }
        access_log /var/log/nginx/roamercc.access.log combined;
         }

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

在location里加入如下一行试试

fastcgi_split_path_info ^(.+?.php)(/.*)$;

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...