Nginx 404-Wordpress Multisite子目录上的错误

时间:2019-05-28 23:31:25

标签: wordpress nginx server multisite

我使用Nginx将wordpress多站点迁移到VPS,并在每个子目录mysite.com/subdir上排除404 nginx错误,不包括/ wp-admin。 这是我的Nginx虚拟主机配置:

server {
    listen 80;
        listen [::]:80;
root /var/www/mysite.com/html;

index index.php index.html index.htm index.nginx-debian.html;

server_name mysite.com www.mysite.com mysite.com/subsite;

location / {
    try_files $uri $uri/ =404;
}

location ~ \.php$ {
    include snippets/fastcgi-php.conf;

    fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;

}
location ~ /\.ht {
    deny all;
}
}

谢谢您的帮助!

0 个答案:

没有答案