Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/kubernetes/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Configuration 如何纠正Wamp上的虚拟主机设置?_Configuration_Virtualhost_Wampserver - Fatal编程技术网

Configuration 如何纠正Wamp上的虚拟主机设置?

Configuration 如何纠正Wamp上的虚拟主机设置?,configuration,virtualhost,wampserver,Configuration,Virtualhost,Wampserver,有人能帮我在我的WAMP服务器上设置这个虚拟主机吗 我已经在网上浏览了好几篇文章和博客,但无法设置 我遵循了这里建议的程序: 当我执行上述操作时,我的服务器会挂断。目前,我在我的C:/windows/system32/drivers/etc/hosts文件中添加了以下内容 127.0.0.1 tsg.local 我用Listen 90更改了httpd.conf Apache配置文件,因为我使用的是端口90 另外,删除了上述教程中建议的#标记 # Virtual hosts Include co

有人能帮我在我的WAMP服务器上设置这个虚拟主机吗

我已经在网上浏览了好几篇文章和博客,但无法设置

我遵循了这里建议的程序:

当我执行上述操作时,我的服务器会挂断。目前,我在我的C:/windows/system32/drivers/etc/hosts文件中添加了以下内容

127.0.0.1 tsg.local
我用Listen 90更改了httpd.conf Apache配置文件,因为我使用的是端口90

另外,删除了上述教程中建议的#标记

# 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>

服务器管理员webmaster@localhost
DocumentRoot“C:\wamp\www\tsg\”
ServerName tsg.local
错误日志“C:\wamp\www\logs\tsg.log”
CustomLog“C:/wamp/www/logs/common.log”common
并将:NameVirtualHost*:80更改为NameVirtualHost*:90


谢谢你提前帮忙

如果删除虚拟主机块后服务器可以正常启动,请尝试修复您的报价。看起来你有一些“神奇的引号”而不是直接的引号-可能是从教程中复制和粘贴的。请尝试以下方法:

<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>

服务器管理员webmaster@localhost
DocumentRoot“C:\wamp\www\tsg\”
ServerName tsg.local
错误日志“C:\wamp\www\logs\tsg.log”
CustomLog“C:/wamp/www/logs/common.log”common

如果80不是一个选项,您可能还想选择一个更标准的端口来监听,8080或8888,而不是90。

本文中提到的过程最终帮助了我。[[1]:非常感谢。我已经熬了三个小时的头把它修好了。仍然感谢你的帮助。