「クライアントがサーバー構成によって拒否されました」というエラーでApacheがviewvc(エラー403)をブロックするのはなぜですか?

DanB

Ubuntu16.04でviewvcを動作させることができません。(同じセットアップがUbuntu 15.10で機能しました。)/ var / log / apache2 /error.logのエラーメッセージは次のとおりです。

[authz_core:error] [pid 24296]
 [client 192.168.1.34:37586] AH01630: client denied by server configuration:
 /usr/lib/cgi-bin/viewvc.cgi

これが私がしたことです。パッケージをインストールしました:

sudo apt install viewvc

構成済み/etc/viewvc/viewvc.conf

[general]
root_parents = /data/svnrepo : svn

[options]
root_as_url_component = 1
allowed_views = annotate, diff, markup, roots, co
template_dir = /etc/viewvc/templates

Apache仮想ホストを設定します。

<VirtualHost *:80>
    ServerAdmin smith@localhost
    ServerName svn.example.com
    Alias /docroot /usr/share/viewvc/docroot
    ScriptAlias / /usr/lib/cgi-bin/viewvc.cgi/

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined

    <Directory /usr/lib/cgi-bin/viewvc.cgi/>
     Require all granted
    </Directory>

    <Directory /usr/share/viewvc/docroot>
     Require all granted
    </Directory>
</VirtualHost>

それを有効にし、Apacheを再起動しました(エラーなし):

sudo a2ensite svn.example.com.conf
sudo service apache2 restart

しかし、svn.example.comにアクセスすると、次のエラーが発生します。

Sun Sep 25 14:25:24.430254 2016] [authz_core:error] [pid 24296]
 [client 192.168.1.34:37586] AH01630: client denied by server configuration:
 /usr/lib/cgi-bin/viewvc.cgi, referer: http://svn.example.com/

私はすでに(問題を解決せずに)試しました:

  • libapache2-svnをインストールしています
  • からすべてのAllowOverrideおよびRequireディレクティブを削除する/etc/apache2/apache2.conf
  • Apache 2.2構文の使用(Order allow, denyAllow from all
  • 追加Options FollowSymLinksExecCGI
  • AddHandler cgi-script cgi
  • iptables -F
  • このページのアドバイス

どんな提案もありがたいです!

DanB

問題は、CGIモジュールが有効になってScriptAliasいないため、コマンドが機能していなかったことです。解決策は次のとおりです。

$ sudo a2enmod cgi
$ sudo service apache2 restart

ブラウザを更新します。

また、<Directory>パーツを削除することで、Apacheの構成を簡素化することもできました

<VirtualHost *:80>
    ServerAdmin smith@localhost
    ServerName svn.example.com
    Alias /docroot /usr/share/viewvc/docroot
    ScriptAlias / /usr/lib/cgi-bin/viewvc.cgi/

    ErrorLog ${APACHE_LOG_DIR}/error.log
    LogLevel warn
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

私を正しい方向に向けるのを手伝ってくれたC.MichaelPilatoに感謝します。

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

Related 関連記事

ホットタグ

アーカイブ