我在Mac上的XAMPP中配置我的apache主机名和虚拟主机。
但是,当我访问主机网址时,xampp会将我重定向到/ dashboard: mydomain.dev/dashboard
这是我的httpd-vhosts.conf:
# Virtual Hosts
<VirtualHost *:80>
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/web_frikinow/public"
ServerName mydomain.dev
</VirtualHost>
这是我的/ etc / hosts文件:
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
127.0.0.1 mydomain.dev
127.0.0.1 Funny-Frontend # added by Apache Friends XAMPP
问题是什么?
答案 0 :(得分:12)
解决方案是在httpd.conf文件中取消注释此模块:
# Virtual hosts
Include etc/extra/httpd-vhosts.conf
答案 1 :(得分:1)
解决办法是在XAMPP控制面板下重启apache。