鍍金池/ 問答/Linux/ 在修改了一些vps的設(shè)置后,我的wordpress 博客無法正常訪問了?

在修改了一些vps的設(shè)置后,我的wordpress 博客無法正常訪問了?

我想要給自己的博客加上 ssl,但在這當中的一些變動讓我的博客無法訪問了,訪問首頁會出現(xiàn)下載文件的對話框,其他的頁面會出現(xiàn)404錯誤。博客的根目錄是/home/wwwroot/www.sangyunxin.me(不過我也不清楚這是不是博客的根目錄),感覺跟 nginx 的配置文件有關(guān),我現(xiàn)在的配置是:

server {
    listen 80 default_server;
    listen [::]:80 default_server;

    root /home/wwwroot;

    # Add index.php to the list if you are using PHP
    index index.php index.nginx-debian.html;

    server_name www.sangyunxin.me;

    location / {
            # First attempt to serve request as file, then
            # as directory, then fall back to displaying a 404.
            try_files $uri $uri/ /index.php?q=$uri&$args;
    }
    error_page 404 /404.html;
    error_page 500 502 503 504 /50x.html;
    location = /50x.html{
            root /usr/share/nginx/www;
    }

    location ~ \.php$ {
            try_files $uri = 404;
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_index index.php;
            include fastcgi_params;
    }
}

拜托諸位大佬幫我看看哪里出問題了?

回答
編輯回答
我不懂

既然你的根目錄是 /home/wwwroot/www.sangyunxin.me,那為什么你配置里寫的是 root /home/wwwroot

2017年11月7日 11:21