1

我正在尝试将 Apache 配置为在多个端口上提供服务,但是当我添加多个监听指令时,我得到了 204。

仅使用一个侦听指令即可正常工作(仅具有相应端口的虚拟主机)

这是我的虚拟主机配置:

# 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>
4

1 回答 1

2

确保在“httpd.conf”中将其设置为侦听端口 80。我认为它始终需要侦听该端口。

您还需要在 httpd.conf 文件的末尾添加指令“AcceptMutex flock”。

于 2012-11-16T15:24:08.987 回答