鍍金池/ 問答/Linux/ nginx配置了server_name為什么還是提示網(wǎng)站無法正常運(yùn)作?

nginx配置了server_name為什么還是提示網(wǎng)站無法正常運(yùn)作?

server

{
    listen 80 default_server;
    #listen [::]:80 default_server ipv6only=on;
    server_name _;
    index index.html index.htm index.php;
    root  /home/wwwroot/default;

    #error_page   404   /404.html;

    # Deny access to PHP files in specific directory
    #location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }

    include enable-php.conf;

    location /nginx_status
    {
        stub_status on;
        access_log   off;
    }

    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
    {
        expires      30d;
    }

    location ~ .*\.(js|css)?$
    {
        expires      12h;
    }

    location ~ /.well-known {
        allow all;
    }

    location ~ /\.
    {
        deny all;
    }

    access_log  /home/wwwlogs/access.log;
}

include vhost/*.conf;
}
我只是更改了server_name,為什么還是只能ip地址訪問?試了各種方法都不行,求大神給指導(dǎo)???在一個(gè)域名是在萬網(wǎng)備案的,服務(wù)器是小鳥云的有影響么?小菜鳥急求解答!!!

回答
編輯回答
舊顏

找小鳥云加域名白名單

2018年2月12日 12:49