域未连接到nginx

时间:2017-09-30 18:00:49

标签: ubuntu nginx

我在VPS上运行nginx,将Vultr的DNS配置为我的名称服务器。 这是我的配置文件,我的网站是example.com

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


    root /var/www/html;

    index index.php index.html index.htm index.nginx-debian.html;
    server_name example.com www.example.com;

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


    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
    }


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

nginx消息显示在我的VPS的IP上,但不在我的主域上。

0 个答案:

没有答案