6
如何在Apache httpd虚拟主机中配置基本身份验证?
我正在尝试使用Apache http配置Mercurial访问。它需要认证。我的/etc/apache2/sites-enabled/mercurial样子是这样的: NameVirtualHost *:8080 <VirtualHost *:8080> UseCanonicalName Off ServerAdmin webmaster@localhost AddHandler cgi-script .cgi ScriptAliasMatch ^(.*) /usr/lib/cgi-bin/hgwebdir.cgi/$1 </VirtualHost> 我在互联网上阅读的每个教程都告诉我插入以下几行: AuthType Basic AuthUserFile /usr/local/etc/httpd/users 但是当我这样做时,出现以下错误: # /etc/init.d/apache2 reload Syntax error on line 8 of /etc/apache2/sites-enabled/mercurial: AuthType not allowed here 我的发行版是一个定制的Ubuntu,名为Turnkey Linux Redmine