【问题标题】:nginx | site is not available by accessing with wwwnginx |无法通过 www 访问网站
【发布时间】:2014-12-31 10:47:58
【问题描述】:

也许你能帮助我。我正在使用 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;
    ... 

哪里出了问题?谢谢!

【问题讨论】:

    标签: nginx configuration


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-04-07
      • 1970-01-01
      • 2020-05-16
      • 1970-01-01
      • 2014-01-18
      • 2021-07-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多