我正在尝试将Apache配置为在多个端口上提供服务,但是当我添加多个listen指令时,我得到了204.
只使用一个listen指令(只有具有相应端口的虚拟主机)
才能正常工作这是我的vhost配置:
# Listen
Listen 8013
Listen 8015
Listen 8019
# NameVirtualHost
NameVirtualHost *:8013
NameVirtualHost *:8015
NameVirtualHost *:8019
# Projects
<VirtualHost *:8013>
ServerName local.dev
DocumentRoot "/Users/laskew/DEV"
<Directory "/Users/laskew/DEV">
Options Indexes FollowSymLinks Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
# Subversion
<VirtualHost *:8015>
ServerName local.svn
DocumentRoot "/Users/laskew/SVN"
<Directory "/Users/laskew/SVN">
Options Indexes FollowSymLinks Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
# Git
<VirtualHost *:8019>
ServerName local.git
DocumentRoot "/Users/laskew/GITHUB"
<Directory "/Users/laskew/GITHUB">
Options Indexes FollowSymLinks Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
答案 0 :(得分:2)
确保在你的“httpd.conf”中将它设置为侦听端口80.我认为它总是需要监听该端口。
您还需要在httpd.conf文件的末尾添加指令“AcceptMutex flock”。