[wordpress] nginx+fpm伪静态配置 | 祭夜の咖啡馆
  • 欢迎光临,这个博客颜色有点多

[wordpress] nginx+fpm伪静态配置

Wordpress msojocs 1个月前 (03-26) 112次浏览 已收录 0个评论 扫描二维码

最近apache老崩溃,把我搞烦了,换fpm试试看。

简中互联网搜了一圈,内容一堆重复,但是不起作用,有点难绷。。。

参考:

https://stackoverflow.com/questions/31003448/nginx-wordpress-url-rewriting-with-another-rule

最终配置:

server {
        # .....端口域名SSL配置省略

        root /usr/share/nginx/php/blog;
        index index.php index.html;
        location / {
            try_files $uri $uri/ $uri.html $uri.php /index.php?$args;
        }
        
        location ~ \.php$ {
            fastcgi_pass 10.0.0.1:9000;
            fastcgi_index index.php;
            fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_param PATH_INFO $fastcgi_path_info;
            fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
            include  fastcgi_params;
        }
}

祭夜の咖啡馆 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:[wordpress] nginx+fpm伪静态配置
喜欢 (0)
[1690127128@qq.com]
分享 (0)
发表我的评论
取消评论
OwO表情
贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址