【发布时间】:2012-03-18 12:57:09
【问题描述】:
我整个晚上都在为此苦苦思索,看不出哪里出错了。我想在 xampp 上设置一个主机 mysite.local,并按照所有说明进行操作,但我一直被重定向到 mysite.local/xampp。
我在这里出错的任何想法?路径是正确的,我已经重新启动了 Apache :)
我编辑了我的 hosts 文件以添加:
127.0.0.1 mysite.local
我编辑了额外的/httpd-vhosts.conf:
NameVirtualHost localhost:80
<VirtualHost localhost:80>
ServerName localhost
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs"
<Directory "/Applications/XAMPP/xamppfiles/htdocs">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>
<VirtualHost localhost:80>
<Directory "/Applications/XAMPP/xamppfiles/htdocs/wd">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
</Directory>
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/wd"
ServerName mysite.local
</VirtualHost>
【问题讨论】:
标签: apache xampp localhost httpd.conf vhosts