有人能帮我在我的WAMP服务器上设置这个虚拟主机吗?
我在网上读过几篇文章和博客,但没能把它设置好。
我遵循了这里建议的程序:http://www.ruifeio.com/2011/01/30/setting-up-virtual-hosts-on-wampserver/
当我完成上述操作时,我的服务器就会挂断。目前,我在C文件中添加了以下内容:/windows/system32 32/驱动器/etc/host文件
127.0.0.1 tsg.local
由于我使用的是端口90,所以我用Listen 90更改了httpd.conf Apache配置文件
另外,删除#标签,如上述教程中所建议的。
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
我还在httpd-vhosts.conf中添加了以下内容
<VirtualHost *:90>
ServerAdmin webmaster@localhost
DocumentRoot “C:\wamp\www\tsg\”
ServerName tsg.local
ErrorLog “C:\wamp\www\logs\tsg.log”
CustomLog “C:/wamp/www/logs/common.log” common
</VirtualHost>
并将: NameVirtualHost *:80改为NameVirtualHost *:90
谢谢你提前帮忙!
发布于 2013-02-11 19:01:42
如果您的服务器将在删除Virtual块后启动良好,请尝试修复您的引号。看起来你有一些“魔术引号”,而不是直引号--很可能是从教程中复制和粘贴出来的。试一试:
<VirtualHost *:90>
ServerAdmin webmaster@localhost
DocumentRoot "C:\wamp\www\tsg\"
ServerName tsg.local
ErrorLog "C:\wamp\www\logs\tsg.log"
CustomLog "C:/wamp/www/logs/common.log" common
</VirtualHost>
您还可能希望选择一个更标准的端口来侦听,8080或8888,而不是90,如果80不是一个选项。
https://stackoverflow.com/questions/14818692
复制相似问题