nginx |使用www访问无法访问网站

时间:2014-12-31 10:47:58

标签: nginx configuration

可能你可以帮助我。我正在使用nginx和ubunty,输入以下内容无法访问我的网站: www.example.com 。并提供: example.com

server {
    listen 80 default_server;
    listen [::]:80 default_server ipv6only=on;

    root /usr/share/nginx/html;
    index index.php index.html index.htm;

    # Make site accessible from http://localhost/
    server_name www.example.com example.com;
    ... 

哪里有问题?谢谢!

1 个答案:

答案 0 :(得分:2)

检查' www.example.com'是指您的网站。如果没有,你必须创建一个' A'为此记录。在大多数情况下,您必须在提供DNS管理的公司执行此操作,可能是您注册域名的公司。