有人可以帮我在我的WAMP服务器上设置这个虚拟主机吗?
我已经在线阅读了几篇帖子和博客,但无法进行此设置。
我按照此处建议的程序:http://www.ruifeio.com/2011/01/30/setting-up-virtual-hosts-on-wampserver/
当我执行上述操作时,我的服务器挂断了。现在我将以下内容添加到我的C:/ windows / system32 / drivers / etc / hosts文件
中127.0.0.1 tsg.local
我使用Listen 90改变了我的httpd.conf Apache配置文件,因为我使用的是端口90
另外,按照上面教程的建议删除了#tag。
# 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
感谢提前帮忙!
答案 0 :(得分:0)
如果您的服务器将在删除虚拟主机块后正常启动,请尝试修复报价。看起来你有一些“魔术引号”而不是直引号 - 可能来自教程中的复制和粘贴。试试这个:
<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不是一个选项。