[WAS] 국문/영문 context 분리

김봉남·2024년 1월 22일

WAS

목록 보기
2/23
post-thumbnail

WEB 설정

  • Context Root를 국문/영문으로 분리
  • ssl 인증서를 국문/영문으로 분리

httpd.conf

###########################################
# 'VirtualHost' configration
###########################################
NameVirtualHost 00.00.00.00:19903

<VirtualHost 00.00.00.00:19903>
    ServerAdmin ABC@ABC.example.com
    DocumentRoot "/home2/test/www"
    ServerName www.ABC.com
    ServerAlias www.ABC.com

    ErrorLog "|/opt/jboss/httpd/bin/rotatelogs /home2/test/log/test_error_log.%Y%m%d 86400"
    CustomLog "|/opt/jboss/httpd/bin/rotatelogs /home2/test/log/test_access_log.%Y%m%d 86400" combined

#   http -> https Redirect
    RewriteEngine On
    RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R,L]

    JkMount /* testloadbalancer


  <Directory "/home2/test/www">
     <Limit OPTIONS PROPFIND>
      Order allow,deny
      Allow from all
     </Limit>
     <LimitExcept GET POST>
      Order allow,deny
      Deny from all
     </LimitExcept>
  </Directory>


</VirtualHost>

###########################################
# Include extra configration
###########################################
Include /home2/test/conf/extra/*.conf
#EOF###################################EOF#

ssl.conf

###########################################
# SSL 'www.ABC.co.kr' configration
###########################################
<VirtualHost 00.00.00.00:14903>
    ServerName www.ABC.co.kr:14903
    DocumentRoot "/home2/test/www"
    ServerAdmin  ABC@admin.co.kr

    CustomLog    "|/opt/jboss/httpd/bin/rotatelogs /home2/test/log/test_www.ABC.co.kr_access_log.%Y%m%d 86400 +540" combined env=!do_not_log
    CustomLog    "|/opt/jboss/httpd/bin/rotatelogs /home2/test/log/test_www.ABC.co.kr_ssl_access_log.%Y%m%d 86400 +540" combined env=!do_not_log
    ErrorLog     "|/opt/jboss/httpd/bin/rotatelogs /home2/test/log/test_www.ABC.co.kr_error_log.%Y%m%d 86400 +540"

    #   SSL Engine Switch:
    SSLengine on
    SSLHonorCipherOrder on
    SSLCipherSuite HIGH:MEDIUM:!SSLv2:!PSK:!SRP:!ADH:!AECDH:!DH:!EXP
    SSLProxyCipherSuite HIGH:MEDIUM:!SSLv2:!PSK:!SRP:!ADH:!AECDH:!DH:!EXP
    SSLProtocol all -SSLv3 -SSLv2
    SSLProxyProtocol all -SSLv3 -SSLv2

    SSLCertificateFile    "/ssl/server.crt"
    SSLCertificateKeyFile "/ssl/server.key"
    SSLCACertificateFile  "/ssl/server.sca"

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


   # File Base Mapping
   # JkMountFile /home2/test/conf/extra/uriworkermap.properties
     JkMount /* testloadbalancer
</VirtualHost>

###########################################
# SSL 'eng.ABC.co.kr' configration
###########################################
<VirtualHost 00.00.00.00:14903>
    ServerName eng.ABC.co.kr:14903
    DocumentRoot "/home2/test/www"
    ServerAdmin  ABC@admin.co.kr

    CustomLog    "|/opt/jboss/httpd/bin/rotatelogs /home2/test/log/test_eng.ABC.co.kr_access_log.%Y%m%d 86400 +540" combined env=!do_not_log
    CustomLog    "|/opt/jboss/httpd/bin/rotatelogs /home2/test/log/test_eng.ABC.co.kr_ssl_access_log.%Y%m%d 86400 +540" combined env=!do_not_log
    ErrorLog     "|/opt/jboss/httpd/bin/rotatelogs /home2/test/log/test_eng.ABC.co.kr_error_log.%Y%m%d 86400 +540"

    #   SSL Engine Switch:
    SSLengine on
    SSLHonorCipherOrder on
    SSLCipherSuite HIGH:MEDIUM:!SSLv2:!PSK:!SRP:!ADH:!AECDH:!DH:!EXP
    SSLProxyCipherSuite HIGH:MEDIUM:!SSLv2:!PSK:!SRP:!ADH:!AECDH:!DH:!EXP
    SSLProtocol all -SSLv3 -SSLv2
    SSLProxyProtocol all -SSLv3 -SSLv2

    SSLCertificateFile    "/ssl/server.crt"
    SSLCertificateKeyFile "/ssl/server.key"
    SSLCACertificateFile  "/ssl/server.sca"

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


   # File Base Mapping
   # JkMountFile /home2/test/conf/extra/uriworkermap.properties
     JkMount /* testloadbalancer
</VirtualHost>

Was 설정

# server.xml

      </Host>
      <Host name="www.ABC.com" appBase="${server.base}/apps" unpackWARs="true" autoDeploy="false">
            <Context path="" docBase="${server.base}/apps/ROOT" reloadable="true" allowLinking="true"/>

      </Host>
      <Host name="eng.ABC.co.kr" appBase="${server.base}/apps" unpackWARs="true" autoDeploy="false">
           <Context path="" docBase="${server.base}/apps/ROOT_EN" reloadable="true" allowLinking="true"/>
      </Host>
profile
남자다

0개의 댓글