我使用Apache 2.2.12和Tomcat 7.0.61。Apache 2.2.12 JkMount不確認
我從這篇文章中省略了幾個配置文件,因爲除了一個上下文根之外,其他所有的文件都在工作。
我在apache2的vhost目錄下的vhost.conf文件中有幾個jkmounts。他們都工作,除了一個。我在測試環境中具有相同的配置文件,沒有問題。相同的語法和一切。文件已被差異檢查並檢查行結束錯誤。我們正在運行由Novell打包的sles 11盒。服務上下文返回一個禁止。
錯誤日誌:
- [Wed Mar 22 06:09:54 2017] [error] [client requestingip] client denied by server configuration: /srv/www/htdocs/services
- [Wed Mar 22 06:09:54 2017] [error] [client requestingip] client denied by server configuration: /srv/www/htdocs/favicon.ico, referer: https://sub.domain.com/services/request-path/
我在完全喪失,爲什麼這種情況下/srv/ww/htdocs/
正在採取優先時就沒有在同一個web應用託管在同一文件的同一工作者等服務的文件夾中做到這一點。
重要的是要注意,如果我直接在Tomcat上調用這樣的服務: sub.domain.com:8080/services/path-to-function/##
。
它可以工作,但我們不應該直接打Tomcat。下面是掛載等 - 一些明顯的原因欺騙細節。其他注意事項:
- 我跑rcapache2 configtest「語法OK」
- 我跑(以防萬一),該文件被創建和修改上通過膩子在Linux中DOS2UNIX的文件名。
- 多個其他休息和肥皂服務正在這個盒子上運行。所有在同一個webapp文件夾中的戰爭和在同一個vhost.conf文件中聲明的上下文。
- 在mod_jk.log文件日誌級別「跟蹤」我看不出它甚至試圖映射上下文URI
<VirtualHost _default_:80>
ServerName sub.domain.com:80
ServerAdmin [email protected]
ErrorLog /var/log/apache2/error_log
TransferLog /var/log/apache2/access_log
SSLEngine off
Alias /services "/opt/apache-tomcat-<version-num>/webapps/services"
<Directory "/opt/apache-tomcat-<version-num>/webapps/services">
</Directory>
JkMount /services/* worker1
<Location "/services">
Options Indexes FollowSymLinks Includes ExecCGI Multiviews
Order allow,deny
Allow from all
AuthType Basic
AuthName "Services"
AuthzLDAPAuthoritative on
AuthBasicProvider ldap
AuthLDAPURL ldaps://directory.domain.com/o=organization-tree?uid
Require ldap-group cn=service-users,o=oragnization-tree
AuthLDAPBindDN cn=user,o=organization-tree
AuthLDAPBindPassword [email protected]
</Location>
<Location "/services/WEB-INF/">
Deny from all
</Location>
</VirtualHost>
我已經在這個問題上審查多個線程,文檔和網站。
@halfer謝謝你的清理和協助。我能解決這個問題。我會立即發佈修復程序。 –