【问题标题】:WAMP Server will not allow access to website using "www"WAMP 服务器不允许使用“www”访问网站
【发布时间】:2019-03-22 23:20:10
【问题描述】:

我无法在域名前使用“www”访问我的网站,但如果我不使用“www”则可以。我希望两者都可以访问。

我非常熟悉在 Linux 上使用 Apache2 Server,但我并不经常将它与 WAMP 一起使用。我在配置文件中做了很多乱七八糟的事情,并尝试了几种不同的方法,但似乎没有任何效果。

这里是 httpd-vhosts.conf 文件:

# Virtual Hosts

<VirtualHost *:80>
  ServerName localhost
  ServerAlias localhost
  DocumentRoot "${INSTALL_DIR}/www"
  <Directory "${INSTALL_DIR}/www/">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    Require all granted
  </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerName wherehousemke.com
    DocumentRoot "c:/wamp64/www/wherehousemke"
    <Directory  "c:/wamp64/www/wherehousemke/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        Require all granted
    </Directory>
</VirtualHost>

我试图让它工作的网站是http://wherehousemke.com。该 URL 有效,但如果您在其中添加“www”,它将无法正常工作。

【问题讨论】:

    标签: apache webserver wamp wampserver


    【解决方案1】:

    您需要添加从您的 TLD 重定向到 www 子域 https://www.digitalocean.com/community/questions/using-cname-for-www-redirection 的 DNS 记录

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-04-23
      • 2014-05-05
      • 2021-05-03
      • 1970-01-01
      • 2019-01-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多