2017-03-22 2 views
0

Apache 2.2.12 및 Tomcat 7.0.61을 사용하고 있습니다.Apache 2.2.12 JkMount가 인식되지 않습니다.

하나의 컨텍스트 루트를 제외한 모든 컨텍스트 루트가 작동하기 때문에이 게시물의 여러 구성 파일을 생략했습니다.

apache2의 vhost 디렉토리에있는 vhost.conf 파일에 여러 개의 jkmount가 있습니다. 그들 모두는 하나를 제외하고 일합니다. 문제가없는 테스트 환경에서 동일한 구성 파일을 가지고 있습니다. 같은 구문과 모든 것. 파일의 diff 점검 및 행 종료 오류가 있는지 점검했습니다. Novell에서 패키지화 한 sles 11 상자를 실행하고 있습니다. 서비스 컨텍스트는 금지를 반환합니다.

오류 로그 : 같은 웹 어플리케이션에서 호스트 같은 파일에 같은 노동자의 다른 서비스 중 누구도 이렇게 폴더 없을 때 이런 맥락 /srv/ww/htdocs/이 우선 걸리는 이유가 완료 딱하다

- [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/ 

.

내가 톰캣에서 이와 같은 서비스를 직접 호출하는 경우 : sub.domain.com:8080/services/path-to-function/##에주의해야합니다.

작동하지만 Tomcat을 직접 누르지 않아도됩니다. 아래는 마운트 등입니다 - 명백한 이유로 스푸핑 된 일부 세부 사항입니다. 다른 가지주의해야 할 :

  1. 나는 rcapache2으로 configtest 나는 파일이 생성 및 퍼티를 통해 리눅스 박스에 수정 된 (단지 경우) DOS2UNIX 파일 이름을 실행
  2. "구문 확인"을 달렸다.
  3. 여러 다른 휴식 및 비누 서비스가이 상자에서 실행됩니다. 동일한 vhost.conf 파일에 선언 된 동일한 webapp 폴더 및 컨텍스트에있는 모든 전쟁. mod_jk.log 파일 체크 Loglevel "추적"에서
  4. 나는 그것도 상황에 맞는
    <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> 
    

    URI

을지도하려고 경우 표시되지 않습니다 나는이 문제에 대한 여러 스레드, 문서 및 사이트를 검토했습니다.

+1

. 이 문제를 해결할 수있었습니다. 잠시 후 수정 사항을 게시하겠습니다. –

답변

0

여러 구성 옵션을 통해 테스트하는 동안 각 vHost 구성에는 IP 주소 또는 도메인에서 포트가 있어야 함을 알았습니다. 이 실현에 이르게하는 경고는 아파치가 80 번 포트를 중복 사용한다는 경고와 첫 번째 경고가 우선시 될 것입니다. 각 VirtualHost에 고유 한 이름을 추가하고 각 도메인을 별도의 IP에 할당하고 Apache를 다시 시작하면이 문제를 해결할 수있었습니다.

예 : 정리와 지원에 감사드립니다 @halfer

<VirtualHost hostname-service.domain-1.com:80> 
ServerName sub.domain-1.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> 

<VirtualHost hostname-service.domain-2.com:80> 
ServerName sub.domain-2.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>