我正在尝试在WAMPSERVER中设置vhosts,我遇到了一个问题,所有站点都指向第一个vhosts,并且没有正确委派。有没有人遇到过这个问题?
这是我的设置。
在windows主机文件中:
127.0.0.1 siteabc.local
127.0.0.1 sitexyz.local在httpd-vhosts.conf中:
<VirtualHost 127.0.0.1>
DocumentRoot "C:\Users\Rick\Documents\Projects\siteabc"
ServerName siteabc.local
ErrorLog "logs/siteabc-error.log"
CustomLog "logs/siteabc-access.log" common
<Directory "C:\Users\Rick\Documents\Projects\siteabc">
Options Indexes FollowSymLinks
AllowOverride all
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>
<VirtualHost 127.0.0.1>
DocumentRoot "C:\Users\Rick\Documents\Projects\sitexyz"
ServerName sitexyz.local
ErrorLog "logs/sitexyz-error.log"
CustomLog "logs/sitexyz-access.log" common
<Directory "C:\Users\Rick\Documents\Projects\sitexyz">
Options Indexes FollowSymLinks
AllowOverride all
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>
<VirtualHost 127.0.0.1>
DocumentRoot "C:\Users\Rick\Documents\Projects"
ServerName localhost
ErrorLog "logs/localhost-error.log"
CustomLog "logs/localhost-access.log" common
<Directory "C:\Users\Rick\Documents\Projects">
Options Indexes FollowSymLinks
AllowOverride all
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>从这个设置转到siteabc works...but转到sitexyz,它仍然转到siteabc。不知道我到底做错了什么。
谢谢你的关注。
发布于 2012-12-16 05:31:45
好的,结果是我需要为www添加另一个集合。所以一组是不带WWW的虚拟主机,另一组是...
https://stackoverflow.com/questions/13894527
复制相似问题