2013-02-11 53 views
0

任何人都可以帮助我在我的WAMP服务器上设置这个虚拟主机吗?如何纠正Wamp上的这个虚拟主机设置?

我已经通过在线阅读了几篇文章和博客,无法获得此设置。

我遵循的程序这里建议:http://www.ruifeio.com/2011/01/30/setting-up-virtual-hosts-on-wampserver/

当我做以上,我的服务器挂断。目前我增加了以下我的C:/窗/ SYSTEM32 /司机/ etc/hosts文件

127.0.0.1 tsg.local 

我改变了我的httpd.conf Apache的配置文件,听90,因为我使用端口90

另外,按照上述教程中的建议移除#标记。

# Virtual hosts 
Include conf/extra/httpd-vhosts.conf 

我还增加了以下我的httpd-vhosts.conf

<VirtualHost *:90> 
ServerAdmin [email protected] 
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

感谢提前帮忙!

+0

在这篇文章中提到的过程最终帮助了我。 [http://stackoverflow.com/questions/12391799/multiple-virtual-sites-with-wampserver?rq=1][1] [1]:http://stackoverflow.com/问题/ 12391799/multiple-virtual-sites-with-wampserver?rq = 1 – Gaurav 2013-02-11 19:02:32

回答

0

如果您的服务器将在虚拟主机块被移除的情况下正常启动,请尝试修复您的报价。它看起来像你有一些“魔术引号”而不是直引号 - 可能来自教程的复制和粘贴。试试这个:

<VirtualHost *:90> 
ServerAdmin [email protected] 
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不是一个选项。

+0

非常感谢。我在煮了3个小时之后就已经修好了。仍然感谢您的帮助。 – Gaurav 2013-02-11 19:29:48