Why won't apache start again when I add a new nameserver in httpd-vhosts.conf file?
我正在尝试更改本地主机名称服务器,并且已将以下代码添加到C:\\\\ Windows \\\\ System32 \\\\ drivers \\\\ etc \\\\ hosts文件中
1 2 | 127.0.0.1 testingdomainhello.com 127.0.0.1 www.testingdomainhello.com |
并且我已将以下代码添加到C:\\\\ xampp \\\\ apache \\\\ conf \\\\ extra \\\\ httpd-vhosts.conf文件中
1 2 3 4 5 | <VirtualHost *:80> ServerName www.testingdomainhello.com ServerAlias testingdomainhello.com DocumentRoot c:/xampp/htdocs/sites/directory </VirtualHost *:80> |
但是,当我添加该位并尝试在Xampp中重新启动Apache时,它不会重新启动,并且我认为这与端口被阻止有关。如何解决此问题,以便Apache重新启动?
我使用时摔碎的宾果...
1 | </VirtualHost *:80> |
因此只需在虚拟主机上添加标签...
1 | </VirtualHost> |