5

很抱歉有一个与已发布的内容类似的问题,但其他人并没有帮助我。我正在尝试在我的 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

我读到另一个程序可能会阻止它或我的防火墙,但我不知道如何修复它,有什么想法吗?

谢谢

4

1 回答 1

4

谢谢大家的意见,主要有两个问题

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

互联网协议存在问题,即ipv6,所以要解决这个问题,您需要确保 wamp 仅使用ipv4,在里面httpd.conf找到Listen 80并更改为Listen 0.0.0.0:80. 同样,我不确定这是做什么的,如果有人知道,请在下面发布。

我希望这可以帮助其他人陷入困境。

于 2013-04-04T11:21:09.693 回答