404 來自 apache 上的 websvn 配置

404 來自 apache 上的 websvn 配置

我正在嘗試使用 apache 在 Raspberry Pi 上設定 websvn。在 /etc/apache2/conf.d/websvn 中我有以下設定:

# Configuration for websvn using php4.

Alias /websvn /usr/share/websvn

<Directory /usr/share/websvn>
  ## No MultiViews
  DirectoryIndex index.php
  Options FollowSymLinks
  ## MultiViews
  #DirectoryIndex wsvn.php
  #Options FollowSymLinks MultiViews
  ## End MultiViews
  Order allow,deny
  Allow from all
  <IfModule mod_php4.c>
    php_flag magic_quotes_gpc Off
    php_flag track_vars On
  </IfModule>
</Directory>

但是當我嘗試連接到http://.../websvn我收到錯誤 404。

[Sat May 14 12:17:52.737294 2016] [authz_core:debug] [pid 652] mod_authz_core.c(809): [client 79.54.45.40:51893] AH01626: authorization result of Require all granted: granted
[Sat May 14 12:17:52.738726 2016] [authz_core:debug] [pid 652] mod_authz_core.c(809): [client 79.54.45.40:51893] AH01626: authorization result of <RequireAny>: granted
[Sat May 14 12:17:52.741081 2016] [core:info] [pid 652] [client 79.54.45.40:51893] AH00128: File does not exist: /var/www/html/websvn

所以我想問題是它正在嘗試路由到根本不存在的 /var/www/html/websvn 。相反,我認為它應該從 /usr/share/websvn 讀取,就像那個別名一樣。知道為什麼會發生這種情況嗎?我 grep 了整個 /etc 目錄,發現沒有出現字串「/var/www/html/websvn」。

答案1

問題與 websvn conf 檔案放置在 /etc/apache2/conf.d 而不是 /etc/apache2/modules-enabled 中有關。只需從啟用模組的符號連結即可解決該問題。

相關內容