【问题标题】:xampp apache port error?xampp apache端口错误?
【发布时间】:2017-10-01 02:00:31
【问题描述】:

在我的httpd.config 我用这个

Listen 80
Listen 8079

<VirtualHost *:80>
    DocumentRoot "D:\...\wwwroot"
    ServerName testing-website.nl
    <Directory "D:\...\wwwroot">
        Order deny,allow
        Allow from all
        Require all granted
    </Directory>
</VirtualHost>


<VirtualHost *:8079>
    DocumentRoot "C:\xampp\htdocs\wp-developer"
    ServerName wp-developer-test.dev
        <Directory "C:\xampp\htdocs\wp-developer">
        AllowOverride All
        Require all Granted
        </Directory>
</VirtualHost>

Hostfile 也更新为127.0.0.1 wp-developer-test.dev

但是当我在浏览器中使用wp-developer-test.devwp-developer-test.dev:8079 时,我得到的是testing-website.nl 网站。我做错了什么?

非常感谢任何帮助。

【问题讨论】:

    标签: apache vhosts


    【解决方案1】:

    您在主机文件和虚拟主机配置中有不同的服务器名称。 像这样修复主机文件:

    127.0.0.1 wp-developer-test.dev
    

    解释: 第一个定义的虚拟主机用作默认主机。这意味着当请求与任何虚拟主机都不匹配时,使用第一个。

    【讨论】:

    • 编辑:我仍然被重定向到 testing-website.nl
    猜你喜欢
    • 2014-07-26
    • 1970-01-01
    • 2013-03-02
    • 2017-09-20
    • 2014-03-01
    • 2017-07-29
    • 2014-02-20
    • 2015-11-10
    • 2013-01-17
    相关资源
    最近更新 更多