Apache 虚拟主机不工作

Apache 虚拟主机不工作

我在使 Apache 中的虚拟主机正常工作时遇到了麻烦。虚拟主机运行良好,但今天突然停止工作。为了创建虚拟主机,我打开了httpd-vhosts文件并输入如下配置:

<VirtualHost hello.dev:80>
ServerAdmin [email protected]
DocumentRoot "H:\www\hello_webservice"
ServerName hello.dev
ServerAlias www.hello.dev
ErrorLog "logs/hello.dev-error.log"
CustomLog "logs/hello.dev-access.log" common
</VirtualHost>

顺便说一下,由于我能够通过本地主机访问 htdocs,因此 apache 正在运行。

答案1

尝试重新启动 Apache 服务器:

sudo service apache2 restart

在 Windows 上:

httpd.exe -k restart

相关内容