8

OneInStack 下部署 WordPress Multisite 的 Nginx 转发规则

 2 years ago
source link: https://www.ixiqin.com/2022/03/25/oneinstack-deployment-under-the-wordpress-multisite-nginx-forwarding-rules/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

在 OneIn Stack 下如果需要配置一套 WordPress MU 的话,需要配置 Nginx 相应的转发规则。具体的规则如下:

 if (!-e $request_filename) {            
 	rewrite /wp-admin$ $scheme://$host$uri/ permanent;            
 	rewrite ^(/[^/]+)?(/wp-.*) $2 last;            
 	rewrite ^/[^/]+(/.*.php)$ $1 last;    
 }    
 location / {        
 	try_files $uri $uri/ /index.php?$args;    
 }

将上述规则放置在 /usr/local/nginx/conf/rewrite/wordpressmu.conf ,并在创建 VHost 时选择对应的主机即可。

本条目发布于2022年3月25日。属于WordPress分类,被贴了 WordPress 标签。

← 电子书助手 解决 Vercel 在国内访问被墙的问题 →

《OneInStack 下部署 WordPress Multisite 的 Nginx 转发规则》有2个想法

  1. 2b2b93abdefb45ef6ca1e9083c682f81?s=44&d=mm&r=gtk 2022年3月25日 上午10:52

    文章越来越像笔记了。。。

    回复
    1. 博客严格意义上来说,就是给我自己的笔记。

      我写博客首先写给自己,然后才是写给读者。

      回复

发表评论 取消回复

您的电子邮箱地址不会被公开。 必填项已用*标注

评论 *

显示名称 *

电子邮箱地址 *

网站地址

在此浏览器中保存我的显示名称、邮箱地址和网站地址,以便下次评论时使用。

如果有人回复我的评论,请通过电子邮件通知我。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK