Wamp虚拟主机设置 [英] Wamp Virtual Host Set Up
问题描述
很抱歉,对于已发布的内容有类似的问题,但其他人并没有帮助我. 我正在尝试在Windows 8计算机上设置虚拟主机,但是无论我遵循哪个教程或帮助部分,我都似乎无法使其正常工作,这是到目前为止的设置.
sorry for having a similar question to what has been posted all ready but the others aren't helping me. I'm trying to set up a virtual host on my windows 8 computer but I can't seem to get it to work no matter what tutorial or help section i follow, this is my setup so far.
httpd-vhosts.conf
# Virtual Hosts
#
# Required modules: mod_log_config
Listen 80
<VirtualHost *:80>
ServerAdmin admin@localhost.com
DocumentRoot "C:\Program Files (x86)\2. Apps\Wamp\www"
ServerName localhost
<Directory "C:/wamp/www">
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerAdmin admin@localhost.com
DocumentRoot "C:\Users\Chris\Documents\Projects\testsite\Site"
ServerName testingsite
ServerAlias testingsite
<directory "C:\Users\Chris\Documents\Projects\testsite\Site">
Options Indexes FollowSymLinks
Order Allow,Deny
Allow from all
</directory>
</VirtualHost>
主机
# Wamp Server Settings
127.0.0.1 localhost
127.0.0.1 testingsite
httpd.conf
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
如果我尝试开始擦拭,图标将变为橙色. 如果我从命令提示符下运行httpd.exe,则会出现以下错误:
If i try to start wamp the icon goes orange. If i run httpd.exe from command prompt i get the following error:
C:\Program Files (x86)\2. Apps\Wamp\bin\apache\apache2.4.2\bin>httpd.exe
(OS 10048)Only one usage of each socket address (protocol/network address/port)
is normally permitted. : AH00072: make_sock: could not bind to address [::]:80
(OS 10048)Only one usage of each socket address (protocol/network address/port)
is normally permitted. : AH00072: make_sock: could not bind to address 0.0.0.0:
80
AH00451: no listening sockets available, shutting down
AH00015: Unable to open logs
我了解到另一个程序可能正在阻止它或我的防火墙,但是我不知道如何解决它,有什么主意吗?
I read that another program might be blocking it or my firewall but i don't know how to fix it, any ideas?
谢谢
推荐答案
感谢大家的投入,主要有两个问题
Thanks for everyone's input, there were two main problems
我将wamp安装到一个文件夹中,该文件夹嵌套在名称为空格的文件夹中,所以有人告诉我c:/folder/folder with a space/wamp/
这是一种不好的做法,如果有人知道为什么请告诉我.
I installed wamp into a folder which was nested in a folder who's name had a space in so c:/folder/folder with a space/wamp/
which i have since been told is bad practice, if anyone knows why please tell.
互联网协议存在问题,即ipv6
,因此要解决此问题,您需要确保wamp仅在httpd.conf
内部使用ipv4
,找到Listen 80
并更改为Listen 0.0.0.0:80
.再次,我不确定这样做是什么,如果有人知道,请在下面发布.
The were issues with the internet protocol, namely ipv6
, so solve this you need to ensure wamp only uses ipv4
, inside httpd.conf
find Listen 80
and change to Listen 0.0.0.0:80
. Again i'm not sure what this does so if anyone knows please post below.
我希望这可以帮助其他人陷入困境.
I hope this helps anyone else stuck.
这篇关于Wamp虚拟主机设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!