【问题标题】:Why won't apache start again when I add a new nameserver in httpd-vhosts.conf file?当我在 httpd-vhosts.conf 文件中添加新的名称服务器时,为什么 apache 不会重新启动?
【发布时间】: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 不是问题。

标签: apache xampp port


【解决方案1】:

我用的时候把它弄坏了的宾果游戏……

</VirtualHost *:80>

所以只需用标签结束你的虚拟主机...

</VirtualHost>

【讨论】:

  • 其实我发现使用任何 ole 文档根目录都没有影响。在 LAMP 系统上,这是导致错误的第一件事。而且我认为 WAMP 也是如此……仅供参考!
  • 是的,在我尝试了你用作结束标签的东西之前,我很难打破它:)
猜你喜欢
  • 1970-01-01
  • 2020-10-04
  • 1970-01-01
  • 1970-01-01
  • 2011-07-16
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-11-10
相关资源
最近更新 更多