迁移后默认主页出现问题

时间:2019-06-10 11:43:59

标签: wordpress apache nginx polylang

我已经运行了一些从服务器A(基于Apache2)迁移到服务器B(基于Nginx)的网站,该网站基于wordpress CMS和polylang插件来管理多种语言。现在这是问题所在,我已经设置了默认语言,但是它似乎被忽略了,例如默认站点语言被标记为英语,但是每次我进入该网站时,它都会向我返回带有错误IT / ES的站点(随机)

这是我对nginx的配置:

server {
    root /var/www/html/example_com/web/;
    index index.php;
    server_name example.com www.example.com;

    error_log /var/www/html/example_com/log/error.log;
    access_log /var/www/html/example_com/log/nginx-access.log;

    try_files $uri $uri/ /index.php?$args;

    location ~* \.php$ {
            fastcgi_pass unix:/var/run/php/php5.6-fpm.sock;
            include         fastcgi_params;
            fastcgi_param   SCRIPT_FILENAME    $document_root$fastcgi_script_name;
            fastcgi_param   SCRIPT_NAME        $fastcgi_script_name;

            fastcgi_buffer_size 128k;
            fastcgi_buffers 4 256k;
            fastcgi_busy_buffers_size 256k;
    }

include /var/www/html/example_com/web/nginx.conf; ##HERE is the basic configuration for W3Total Cache Plugin

listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}

server {
if ($host = example.com) {
    return 301 https://$host$request_uri;
} # managed by Certbot

if ($host = www.example.com) {
    return 301 https://$host$request_uri;
} # managed by Certbot

    listen 80;
    server_name example.com www.example.com;
listen 443;
return 404; # managed by Certbot
}

是什么原因引起的? :)

编辑: 迁移是通过“ Duplicator”插件完成的。

0 个答案:

没有答案
相关问题