Wamp虚拟主机设置

时间:2013-03-25 21:39:46

标签: wamp virtual-hosts

抱歉,对于所有准备好的内容都有类似的问题但是其他人没有帮助我。 我正在尝试在我的Windows 8计算机上设置一个虚拟主机,但无论我使用哪个教程或帮助部分,我似乎都无法工作,这是我到目前为止的设置。

的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

如果我尝试启动wamp图标变为橙色。 如果我从命令提示符运行httpd.exe我得到以下错误:

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

我读到另一个程序可能会阻止它或我的防火墙,但我不知道如何解决它,任何想法?

由于

1 个答案:

答案 0 :(得分:3)

感谢大家的投入,有两个主要问题

我将wamp安装到一个文件夹中,该文件夹嵌套在一个文件夹中,该文件夹的名称中有一个空格c:/folder/folder with a space/wamp/我被告知这是不好的做法,如果有人知道为什么请告诉。

互联网协议的问题,即ipv6,所以解决这个问题,你需要确保wamp只使用ipv4,在httpd.conf内找Listen 80并更改为{ {1}}。我不知道这是怎么做的,如果有人知道请在下面发帖。

我希望这有助于其他人坚持下去。