Search Results for 'apache tomcat 연동'

1 POSTS

  1. 2016.11.27 Window 환경에서 Apache2.x - Tomcat7.x 연동

기본적으로 윈도우용 아파치를 구하기가 쉽지 않다.

아래 사이트에서 아파치와 톰캣연동을 위한 mod_jk를 구한다.

 

64비트용으로 다운받음

https://www.apachelounge.com/download/win64/

 

Apache2.x 를 설치한다.

다운받은 아파치를 적당한위치에 풀고 압축을 해제한다.

윈도우 서비스에 등록한다. : 서비스하지 않고 테스트용이라면 무시

 

~bin> httpd -k install

 

설치하려는 아파치가 2개이상이거나 별도의 서비스이름으로 서비스등록하고자 하다면  -n <service_name> 을 추가한다.

apache_2.4_server 라는 service 이름으로 등록하고자 한다면

~bin> httpd -k install -n apache_2.4_server

와 같이 입력한다.

 

기본 아파치가 설정정보에서 경로정도만 변경한다.

 

--------------------------  httpd.conf ----------------------------

 

 - ServerRoot "C:/ADMIN_UIS/Server/Apache24"

 - Listen 80

 - ServerName admin.domain.com:80

 - <Directory "C:/Server/Apache24/htdocs">

 - ScriptAlias /cgi-bin/ "C:/Server/Apache24/cgi-bin/"

 - <Directory "c:/Server/Apache24/cgi-bin">


#####  MOD_JK 설정 추가 ####
LoadModule jk_module modules/mod_jk.so
<IfModule mod_jk.c>
  JkWorkersFile conf/workers.properties
  JkLogFile logs/mod_jk.log
  JkLogLevel info
</IfModule>

 

#vhost는 미사용이므로 일단 주석처리

 

 

------------------------------  workers.properties ---------------------------------

worker.list=tomcat_admin
worker.tomcat_admin.type=ajp13
worker.tomcat_admin.host=admin.domain.com
worker.tomcat_admin.port=8009

 

------------------------------  uriwokermap.properties ----------------------------

/*=tomcat_admin

 

https를 적용하기 위한 처리

 

------------------------------ httpd-ssl.conf  -----------------------------

Listen 443
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5

SSLPassPhraseDialog  builtin


SSLSessionCache none
SSLSessionCacheTimeout  300

<VirtualHost *:443>

#   General setup for the virtual host
DocumentRoot "C:/Server/Apache24/htdocs"
ServerName admin.domain.com:443
ServerAdmin admin@domain.com
ErrorLog "logs/error.log"
TransferLog "logs/access.log"

#   SSL Engine Switch:
#   Enable/Disable SSL for this virtual host.
SSLEngine on

SSLCertificateKeyFile "conf/cerFiles/key.pem"
SSLCertificateFile "conf/cerFiles/cert.pem"
SSLCertificateChainFile "conf/cerFiles/caChain.pem"
SSLCACertificateFile "conf/cerFiles/ca.pem"

 

#<FilesMatch "\.(cgi|shtml|phtml|php)$">
#    SSLOptions +StdEnvVars
#</FilesMatch>
<Directory "c:/Server/Apache24/cgi-bin">
    SSLOptions +StdEnvVars
</Directory>

BrowserMatch "MSIE [2-5]" \
         nokeepalive ssl-unclean-shutdown \
         downgrade-1.0 force-response-1.0

#   Per-Server Logging:
#   The home of a custom SSL log file. Use this when you want a
#   compact non-error SSL logfile on a virtual host basis.
CustomLog "logs/ssl_request.log" \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

</VirtualHost>