我正在使用xampp v7.2.29。
但是我无法设置虚拟主机(vHost)。这是我的代码:
apache \ conf \ extra \ httpd-vhosts.conf
<VirtualHost *:80>
ServerName localhost
DocumentRoot "E:\xampp\htdocs"
<Directory "E:\xampp\htdocs">
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName local.demoapp.com
DocumentRoot "E:\xampp\htdocs\DemoApp"
<Directory "E:\xampp\htdocs\DemoApp">
Require all granted
</Directory>
</VirtualHost>
C:\ Windows \ System32 \ drivers \ etc \ host
127.0.0.1 locl.demoapp.com
我正在使用上面的代码,但出现此错误。
您在主机文件上输入错误。
自从你用过
local.demoapp.com
作为您的服务器名称,您的主机文件应为
127.0.0.1 local.demoapp.com
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句