8
OneInStack 下部署 WordPress Multisite 的 Nginx 转发规则
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.
在 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 标签。
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK