【发布时间】:2013-03-15 13:17:13
【问题描述】:
很抱歉有一个与已发布的内容类似的问题,但其他人并没有帮助我。 我正在尝试在我的 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
我读到另一个程序可能会阻止它或我的防火墙,但我不知道如何修复它,有什么想法吗?
谢谢
【问题讨论】:
-
尝试将
Listen 80从您的 vhosts.conf 中删除。我的是NameVirtualHost *:80。 -
我以为我已经尝试过了,但它没有用,但它现在已经修复它......谢谢。我从 apache 帮助文档中获得了 listen 80 到
-
@SarahKemp 最后一个 - 你知道为什么我会得到一个 403 禁止页面吗?
-
在您展示的配置中没有什么突出的。这个主题有一些你可以尝试的事情:stackoverflow.com/questions/8204902/wamp-403-forbidden-message 确保你记得在更改 conf 文件时重新启动 Apache。
标签: wamp virtual-hosts