【发布时间】:2017-03-09 18:30:27
【问题描述】:
我正在尝试更改我的本地主机名称服务器,并且已将以下代码添加到 C:\Windows\System32\drivers\etc\hosts 文件中
127.0.0.1 testingdomainhello.com
127.0.0.1 www.testingdomainhello.com
我已将以下代码添加到 C:\xampp\apache\conf\extra\httpd-vhosts.conf 文件中
<VirtualHost *:80>
ServerName www.testingdomainhello.com
ServerAlias testingdomainhello.com
DocumentRoot c:/xampp/htdocs/sites/directory
</VirtualHost *:80>
但是,当我添加该位并尝试在 Xampp 中重新启动 Apache 时,它不会重新启动,我假设这与端口被阻止有关。我该如何解决这个问题以便 Apache 重新启动?
【问题讨论】:
-
c:/xampp/htdocs/sites/目录是否存在?
-
是的,确实存在
-
先关闭Skype?
-
Skype 已经关闭,我目前也在 Apache 上使用端口 8080 而不是 80。
-
在激活虚拟主机之前系统工作正常吗?如果没有,那么 Skype 不是问题。