Apache 配置導致遞歸 /index.html

Apache 配置導致遞歸 /index.html

我正在使用 puppet 配置 Apache,但遇到了問題。我正在嘗試提供一個簡單的首頁,其中包含 Kibana 和 Uchiwa 的 2 個子頁面的連結。我正在嘗試用於http://server/loggingkibana,並http://server/monitor重定向到 Uchiwa。到目前為止,該/monitorURL 工作正常,重定向效果良好。

URL/logging最終指向我http://server/monitor/index.html/index.html/index.html/index.html/index.html/...等等。

Puppet 產生的設定結果如下所示:如果有人能發現其中的問題,我可以修復 Puppet 設定!

<VirtualHost *:80>
  ServerName testnode.local.net

  DocumentRoot "/var/www/html/frontpage/"
  AliasMatch /logging "/usr/share/kibana/"

  <Directory "/var/www/html/frontpage/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
  </Directory>

  ErrorLog "/var/log/httpd/testnode.local.net_error.log"
  ServerSignature Off
  CustomLog "/var/log/httpd/testnode.local.net_access.log" combined

  Redirect permanent /monitor http://testnode.local.net:3000/

  ServerAlias testnode
</VirtualHost>

答案1

午飯後我又回到這裡,發現了問題。此後,我稍微調整了我的配置,Directory為其他資料夾(/kibana)添加了一個區塊,但我認為關鍵的變化是:

Alias /logging "/usr/share/kibana/"

更改AliasMatchAlias!

希望這對未來的 Google 員工有所幫助。

相關內容