<VirtualHost *:8060>

    <IfModule mod_cache_disk.c>
      CacheEnable disk /main/s
      CacheEnable disk /support/s
      CacheIgnoreHeaders Set-Cookie
      CacheRoot "/data001/apache_cache/wiki1"
      CacheDirLevels 2
      CacheDirLength 1
    </IfModule>

    ServerName          collabmobile.lge.com
    DocumentRoot        /engn001/apache_collab/docs

    RewriteEngine on

    IncludeOptional "/engn001/apache_collab/config/maintain-enabled/*.collab*.conf"

    RewriteRule         ^/$                             /main/ [R]

    ProxyPass           /main      http://10.185.157.200:18888/main
    ProxyPassReverse    /main      http://10.185.157.200:18888/main

    ProxyPass           /support   http://10.185.152.44:18889/support
    ProxyPassReverse    /support   http://10.185.152.44:18889/support

    CustomLog "|/engn001/apache_collab/bin/rotatelogs -l /engn001/apache_collab/logs/access_log.collab.mobile.%y-%m-%d 86400" logresptime
    ErrorLog "|/engn001/apache_collab/bin/rotatelogs -l /engn001/apache_collab/logs/error_log.collab.mobile.%y-%m-%d 86400"

</VirtualHost>


<VirtualHost *:8060>

    ServerName    collab.lge.com
    DocumentRoot  /engn001/apache_collab/docs

    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{HTTPS} off
        RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [P,R,L]
    </IfModule>

#    CustomLog "|/engn001/apache_collab/bin/rotatelogs -l /engn001/apache_collab/logs/access_log.collab.%y-%m-%d 86400" logresptime
#    ErrorLog "|/engn001/apache_collab/bin/rotatelogs -l /engn001/apache_collab/logs/error_log.collab.%y-%m-%d 86400"

</VirtualHost>

<VirtualHost *:8061>

    <IfModule mod_cache_disk.c>
      CacheEnable disk /main/s
      CacheEnable disk /support/s
      CacheIgnoreHeaders Set-Cookie
      CacheRoot "/data001/apache_cache/wiki1"
      CacheDirLevels 2
      CacheDirLength 1
    </IfModule>

    ServerName          collab.lge.com
    DocumentRoot        /engn001/apache_collab/docs

    RewriteEngine on

    SSLEngine               On
    SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
    SSLHonorCipherOrder on
    SSLCipherSuite HIGH:MEDIUM:!SSLv2:!PSK:!SRP:!ADH:!AECDH:!3DES:!IDEA:!RC4:!MD5

    ## 생성한 SSL 인증서와 개인키
    SSLCertificateFile /engn001/local/ssl/star_lge_com_cert.pem
    SSLCertificateKeyFile /engn001/local/ssl/star_lge_com_key.pem
    SSLCertificateChainFile /engn001/local/ssl/Chain_RootCA_Bundle.crt

    IncludeOptional "/engn001/apache_collab/config/maintain-enabled/*.collab*.conf"

    <Location /main>
        Require all granted
        # http 1.0 사용
        SetEnv force-proxy-request-1.0 1
        # Keepalive 를 사용하지 않음
        SetEnv proxy-nokeepalive 1
        # 초기 요청 인 경우 Apache의 Pooling된 연결을 사용하지 못하게 하는 설정
        SetEnv proxy-initial-not-pooled 1
    </Location>

    <Proxy *>
        Require all granted
    </Proxy>

    # Collab red에 아래 IP만 접근 허용함.
    <LocationMatch "/red/.*">
        Order deny,allow
        Allow from 10.185.128.40  # apache #1
        Allow from 10.185.128.41  # apache #2
        Allow from 10.185.152.38  # COL02 - crowd
        Allow from 10.185.157.78  # COL01 - collab
        Allow from 128.0.0.1      # localhost
        Allow from 10.185.157.79  # COL03
        Allow from 10.185.157.80  # COL05
        Allow from 10.185.152.44  # JIRA1 Service IP
        Allow from 10.185.152.43  # JIRA1 Physical IP
        Allow from 10.185.130.96  # LOG
        Allow from 10.185.152.51  # STG05
        Allow from 10.185.128.224 # collab.lge.com (L4)
        Allow from 10.185.128.208 # *lm.lge.com (L4)
        Allow from 10.177.21.88   # 정재훈C
        Allow from 10.65.187.202
        Allow from 10.177.22.34   # 전상용C
        Allow from 10.65.187.200
        Allow from 10.177.21.77   # 박성리s
        Allow from 10.222.31.63
        Allow from 10.223.209.119 # 이병화s
        Allow from 10.177.21.55
        Allow from 10.222.79.192  # 김종은C
        Allow from 10.177.21.99   # 임시
        Allow from 10.177.22.136  #정호영
        Allow from 10.65.180.7
        Allow from 10.177.22.143  #박찬범
        Allow from 10.65.187.119
        Allow from 10.222.38.118  #임시
        Allow from 10.177.22.37   #송범수
        Allow from 10.65.177.7
        Allow from 10.177.22.131  #OpenSource1
        Allow from 10.177.178.69  #OpenSource2
        Allow from 10.177.118.226 #OpenSource3
        Deny from all
    </LocationMatch>

    ############# / 로 접근시 main 으로 전환 #########
    RewriteRule         ^/$   https://collab.lge.com/main/ [R]

    # Internet Explorer 접속시 안내 페이지로 redirection
    RewriteCond %{HTTP_USER_AGENT} .*Trident.* [NC]
    RewriteRule ^/support/(.*) /jira_stop_ie_support.html [R=302]

    RewriteCond %{HTTP_USER_AGENT} .*MSIE.* [NC]
    RewriteRule ^/support/(.*) /jira_stop_ie_support.html [R=302]

    # 보안취약점 조치를 위해 SendBulkMail 차단
    ProxyPass           /support/secure/admin/SendBulkMail!default.jspa !
    ProxyPass           /support/admin/SendBulkMail!default.jspa !
    ProxyPass           /support/SendBulkMail!default.jspa !

    <Location /support/secure/admin/SendBulkMail!default.jspa>
        ErrorDocument 404 "Tracker does not support this function."
    </Location>
    <Location /support/admin/SendBulkMail!default.jspa>
        ErrorDocument 404 "Tracker does not support this function."
    </Location>
    <Location /support/SendBulkMail!default.jspa>
        ErrorDocument 404 "Tracker does not support this function."
    </Location>

    # JQL Null 필터 생성 차단
    RewriteCond %{REQUEST_URI} ^/support/rest/api/2/filter/$
    RewriteCond %{REQUEST_METHOD} POST
    RewriteCond %{HTTP_REFERER} (.*)jql=$
    RewriteRule ^/support/rest/api/2/filter/$ !

    RewriteCond %{REQUEST_URI} ^/support/rest/api/2/filter/[0-9]*$
    RewriteCond %{REQUEST_METHOD} PUT
    RewriteCond %{HTTP_REFERER} (.*)jql=$
    RewriteRule ^/support/rest/api/2/filter/[0-9]*$ !


#-- main 시작 --

    # dashboard all-update request 배제
    RewriteRule ^/main/rest/dashboardmacros/1.0/updates - [R=200,NC,L]

    # space Admin의 Layout기능 배제
    ProxyPass           /main/spaces/listdecorators.action !

    # space Advanced의 export배제
    ProxyPass           /main/spaces/flyingpdf/flyingpdf.action !
    ProxyPass           /main/spaces/exportspacehtml.action !
    ProxyPass           /main/spaces/exportspacexml.action !

    # Space Admin의 Remove Space배제
    ProxyPass           /main/spaces/removespaces.action !
    ProxyPass           /main/spaces/removespace.action !

    <Location /main/spaces/listdecorators.action>
        ErrorDocument 404 "Confluence does not support this function."
    </Location>
    <Location /main/spaces/flyingpdf/flyingpdf.action>
        ErrorDocument 404 "Confluence does not support this function."
    </Location>
    <Location /main/spaces/exportspacehtml.action>
        ErrorDocument 404 "Confluence does not support this function."
    </Location>
    <Location /main/spaces/exportspacexml.action>
        ErrorDocument 404 "Confluence does not support this function."
    </Location>
    <Location /main/spaces/removespaces.action>
        ErrorDocument 404 "Confluence does not support this function."
    </Location>
    <Location /main/spaces/removespace.action>
        ErrorDocument 404 "Confluence does not support this function."
    </Location>

    <Location /main/download/attachments/519953510/>
        Order deny,allow
        deny from all
    </Location>

    # Collab main Contents Index Flush Queue
    ProxyPass           /main/admin/flushindexqueue.action      http://10.185.157.78:8090/main/admin/flushindexqueue.action timeout=600000
    ProxyPassReverse    /main/admin/flushindexqueue.action      http://10.185.157.78:8090/main/admin/flushindexqueue.action timeout=600000

    # inlinetask를 하나씩 처리하도록!
    ProxyPass           /main/rest/inlinetasks http://10.185.128.40:8080/main/rest/inlinetasks
    ProxyPassReverse    /main/rest/inlinetasks http://10.185.128.40:8080/main/rest/inlinetasks

    # Copy Space에 대해 Proxy Timeout 별도 설정
    ProxyPass           /main/spaces/docopyspace.action      http://10.185.157.200:8090/main/spaces/docopyspace.action timeout=600000
    ProxyPassReverse    /main/spaces/docopyspace.action      http://10.185.157.200:8090/main/spaces/docopyspace.action timeout=600000

    # Do backup에 대해 Proxy Timeout 별도 설정
    ProxyPass           /main/spaces/dobackup.action      http://10.185.157.200:8090/main/spaces/dobackup.action timeout=600000
    ProxyPassReverse    /main/spaces/dobackup.action      http://10.185.157.200:8090/main/spaces/dobackup.action timeout=600000

    # Edit Page에 대해 Proxy Timeout 별도 설정
    ProxyPass           /main/pages/editpage.action      http://10.185.157.200:8090/main/pages/editpage.action timeout=1800
    ProxyPassReverse    /main/pages/editpage.action      http://10.185.157.200:8090/main/pages/editpage.action timeout=1800

    # Remove Page Permission에 대해 Proxy Timeout 별도 설정
    ProxyPass           /main/pages/removepagepermission.action      http://10.185.157.200:8090/main/pages/removepagepermission.action timeout=1800
    ProxyPassReverse    /main/pages/removepagepermission.action      http://10.185.157.200:8090/main/pages/removepagepermission.action timeout=1800

    # Queue Contents에 대해 Proxy Timeout 별도 설정
    ProxyPass           /main/admin/viewindexqueue.action      http://10.185.157.200:8090/main/admin/viewindexqueue.action timeout=1800
    ProxyPassReverse    /main/admin/viewindexqueue.action      http://10.185.157.200:8090/main/admin/viewindexqueue.action timeout=1800

    # Client Time 측정용 tracking.gif가 VPN에서 접속 시 Loading이 오래 걸리는 문제 해결
    ProxyPass           /main/time/tracking.gif       http://10.185.130.96:8888/wiki1/tracking.gif
    ProxyPassReverse    /main/time/tracking.gif       http://10.185.130.96:8888/wiki1/tracking.gif


    ProxyPass           /synchrony-main       http://10.185.157.200:8091/synchrony-main
    <Location /synchrony-main>
        <RequireAll>
            Require all granted
            Require not ip 10.177.40.45 10.175.48.115 10.177.222.254 10.175.161.207 10.175.58.133 10.175.118.106 10.186.164.64 10.177.108.142 10.186.156.164 10.177.207.49 10.186.120.152 10.186.118.46 10.186.160.160 10.175.201.114 10.177.247.50
        </RequireAll>
        RewriteEngine on
        RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
        RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC]
        RewriteRule .* ws://10.185.157.200:8091%{REQUEST_URI} [P]
    </Location>

    #### 아래 IP를 제외하곤 login 시, csso로 이동
    #### 본 블록을 주석 처리하면 hlm login 수행
    RewriteCond %{REMOTE_ADDR} !^10\.65\.187\.20[0-2]
    RewriteCond %{REQUEST_URI} ^/main/login.action$
    RewriteRule /main/login.action(.*) https://collabmain.lge.com/csso/$1 [R,L,NE]
    ####

    ###### collab main login
    RewriteCond %{HTTP_COOKIE} !^.*crowd\.token_key.*$
#    RewriteRule ^/main/login.action$ https://collab.lge.com/main/login.action [R,L,NE]
    RewriteRule ^/main/(.*) /main/login.action [R,L,NE]

#------------------
# Test Main
    ProxyPass           /main2          http://10.185.152.56:18492/main2
    ProxyPassReverse    /main2          http://10.185.152.56:18492/main2

    ProxyPass           /main          http://10.185.157.200:18988/main
    ProxyPassReverse    /main          http://10.185.157.200:18988/main

#    ProxyPass           /main      http://10.185.157.200:8090/main
#    ProxyPassReverse    /main      http://10.185.157.200:8090/main

#-- main 끝 --
#----------------------------------


# 테스트 용도 collab red 를 위해 추가 - 시작
    # Edit Page에 대해 Proxy Timeout 별도 설정(Gliffy TEST)
    ProxyPass           /red/pages/editpage.action      http://10.185.157.78:8990/red/pages/editpage.action timeout=180
    ProxyPassReverse    /red/pages/editpage.action      http://10.185.157.78:8990/red/pages/editpage.action timeout=180

    # confluence_red의 inlinetask를 하나씩 처리하도록!
    ProxyPass        /red/rest/inlinetasks http://10.185.128.40:8090/red/rest/inlinetasks
    ProxyPassReverse /red/rest/inlinetasks http://10.185.128.40:8090/red/rest/inlinetasks

    ProxyPass           /synchrony-red       http://10.185.157.78:8991/synchrony-red
    <Location /synchrony-red>
        Require all granted
        RewriteEngine on
        RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
        RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC]
        RewriteRule .* ws://10.185.157.78:8991%{REQUEST_URI} [P]
    </Location>

    ###### collab red login
    RewriteCond %{HTTP_COOKIE} !^.*crowd\.token_key.*$
#    RewriteRule !^/red/login.action$ https://collab.lge.com/red/login.action [R,L,NE]
    RewriteRule ^/red/(.*) /red/login.action [R,L,NE]

    ######

    ProxyPass           /red/time/tracking.gif       http://10.185.130.96:8888/wiki_red/tracking.gif
    ProxyPassReverse    /red/time/tracking.gif       http://10.185.130.96:8888/wiki_red/tracking.gif

    ProxyPass           /red          http://10.185.157.78:18987/red
    ProxyPassReverse    /red          http://10.185.157.78:18987/red
    ######

#    ProxyPass           /red     http://10.185.157.78:8990/red
#    ProxyPassReverse    /red     http://10.185.157.78:8990/red

# 테스트 용도 collab red를 위해 추가 - 끝
#----------------------------------

# 테스트 용도 collab grey를 위해 추가 - 시작
    <Location /grey>
        Require all granted
        # http 1.0 사용
        SetEnv force-proxy-request-1.0 1
        # Keepalive 를 사용하지 않음
        SetEnv proxy-nokeepalive 1
        # 초기 요청 인 경우 Apache의 Pooling된 연결을 사용하지 못하게 하는 설정
        SetEnv proxy-initial-not-pooled 1
    </Location>

    #### 아래 IP를 제외하곤 login 시, csso로 이동
    #### 본 블록을 주석 처리하면 hlm login 수행
    RewriteCond %{REMOTE_ADDR} !^10\.65\.187\.20[0-2]
    RewriteCond %{REQUEST_URI} ^/grey/login.action$
    RewriteRule /grey/login.action(.*) https://collabgrey.lge.com/csso/$1 [R,L,NE]
    ####

    # collab grey login http
    RewriteCond %{HTTP_COOKIE} !^.*crowd\.token_key.*$
#    RewriteRule !^/grey/login.action$ https://collab.lge.com/grey/login.action [R,L,NE]
    RewriteRule ^/grey/(.*) /grey/login.action [R,L,NE]
    ######

    RewriteCond %{REQUEST_URI} ^/grey/pages [OR]
    RewriteCond %{REQUEST_URI} ^/grey/display [OR]
    RewriteCond %{REQUEST_URI} ^/grey/$ [OR]
    RewriteCond %{REQUEST_URI} ^/grey/spacedirectory [OR]
    RewriteCond %{REQUEST_URI} ^/grey/dosearchsite.action
    RewriteCond %{HTTP_COOKIE} !^.*crowd\.token_key.*$
    RewriteRule /grey/(.*) https://collab.lge.com/grey/$1 [R,L,NE]

    # confluence_grey의 inlinetask를 하나씩 처리하도록!
    ProxyPass        /grey/rest/inlinetasks http://10.185.128.40:8090/grey/rest/inlinetasks
    ProxyPassReverse /grey/rest/inlinetasks http://10.185.128.40:8090/grey/rest/inlinetasks

    # collab grey login https
    ProxyPass           /grey     http://10.185.157.200:18988/grey
    ProxyPassReverse    /grey     http://10.185.157.200:18988/grey

#    ProxyPass           /grey     http://10.185.157.200:8090/grey
#    ProxyPassReverse    /grey     http://10.185.157.200:8090/grey

# 테스트 용도 collab grey를 위해 추가 - 끝
#-----------------------------------

# Collab 2차 인증 테스트를 위해 추가 - 시작
    # Register2 설정
    ProxyPass           /register2      http://10.185.152.38:18082/register2
    ProxyPassReverse    /register2      http://10.185.152.38:18082/register2

    ProxyPass           /register/ssoRegisterDone.do    http://10.185.152.38:18082/register2/ssoRegisterDone.do
    ProxyPassReverse    /register/ssoRegisterDone.do    http://10.185.152.38:18082/register2/ssoRegisterDone.do

    ProxyPass           /register/ssoLoginDone.do     http://10.185.152.38:18082/register2/ssoLoginDone.do
    ProxyPassReverse    /register/ssoLoginDone.do     http://10.185.152.38:18082/register2/ssoLoginDone.do

    ProxyPass           /register      http://10.185.152.38:18081/register
    ProxyPassReverse    /register      http://10.185.152.38:18081/register

# Collab 2차 인증 테스트를 위해 추가 - 끝
#----------------------------------

    #### 아래 IP를 제외하곤 login 시, csso로 이동
    #### 본 블록을 주석 처리하면 hlm login 수행
    RewriteCond %{REMOTE_ADDR} !^10\.65\.187\.20[0-2]
    RewriteCond %{REQUEST_URI} ^/support/login.jsp$
    RewriteRule /support/login.jsp(.*) https://collabsupport.lge.com/csso/$1 [R,L,NE]

    #### 아래 IP를 제외하곤 login 시, csso로 이동
    #### 본 블록을 주석 처리하면 hlm login 수행
    RewriteCond %{REMOTE_ADDR} !^10\.65\.187\.20[0-2]
    RewriteCond %{REQUEST_URI} ^/support_grey/login.jsp$
    RewriteRule /support_grey/login.jsp(.*) https://collabsupport.lge.com/csso/$1 [R,L,NE]

    ###### support login https
    RewriteCond %{HTTP_COOKIE} ^.*crowd\.token_key.*$
    RewriteRule /support/(.*) https://collab.lge.com/support/$1 [R,L,NE]

    ###### support login https
    RewriteCond %{HTTP_COOKIE} ^.*crowd\.token_key.*$
    RewriteRule /support_grey/(.*) https://collab.lge.com/support_grey/$1 [R,L,NE]

    ##### support login page https
    RewriteCond %{HTTP_COOKIE} !^.*crowd\.token_key.*$
#    RewriteRule ^/support/login.jsp$ https://collab.lge.com/support/login.jsp [R,L,NE]
    RewriteRule ^/support/(.*) /support/login.action [R,L,NE]

    ##### support_grey login page https
    RewriteCond %{HTTP_COOKIE} !^.*crowd\.token_key.*$
#    RewriteRule ^/support_grey/login.jsp$ https://collab.lge.com/support_grey/login.jsp [R,L,NE]
    RewriteRule ^/support_grey/(.*) /support_grey/login.action [R,L,NE]

    ###################################################

    ProxyPass           /support/secure/admin/IntegrityChecker.jspa       http://10.185.152.44:18989/support/secure/admin/IntegrityChecker.jspa      timeout=300000
    ProxyPassReverse    /support/secure/admin/IntegrityChecker.jspa       http://10.185.152.44:18989/support/secure/admin/IntegrityChecker.jspa      timeout=300000

    ProxyPass           /support   http://10.185.152.44:18989/support
    ProxyPassReverse    /support   http://10.185.152.44:18989/support

#    ProxyPass           /support   http://10.185.152.44:8084/support
#    ProxyPassReverse    /support   http://10.185.152.44:8084/support

    ProxyPass           /support_grey   http://10.185.152.44:28989/support_grey
    ProxyPassReverse    /support_grey   http://10.185.152.44:28989/support_grey

#    ProxyPass           /support_grey   http://10.185.152.44:18084/support_grey
#    ProxyPassReverse    /support_grey   http://10.185.152.44:18084/support_grey

#------------------
#readonly용 설정
#------------------
    # 개인 profile 화면 접근 차단
    ProxyPass   /readonly/users !

    # space Advanced의 export배제
    ProxyPass           /readonly/spaces/flyingpdf/flyingpdf.action !
    ProxyPass           /readonly/spaces/exportspacehtml.action !
    ProxyPass           /readonly/spaces/exportspacexml.action !

    # Space Admin의 Remove Space배제
    ProxyPass           /readonly/spaces/removespaces.action !
    ProxyPass           /readonly/spaces/removespace.action !

    <Location /readonly/users>
        ErrorDocument 404 "Confluence does not support this function."
    </Location>
    <Location /readonly/spaces/flyingpdf/flyingpdf.action>
        ErrorDocument 404 "Confluence does not support this function."
    </Location>
    <Location /readonly/spaces/exportspacehtml.action>
        ErrorDocument 404 "Confluence does not support this function."
    </Location>
    <Location /readonly/spaces/exportspacexml.action>
        ErrorDocument 404 "Confluence does not support this function."
    </Location>
    <Location /readonly/spaces/removespaces.action>
        ErrorDocument 404 "Confluence does not support this function."
    </Location>
    <Location /readonly/spaces/removespace.action>
        ErrorDocument 404 "Confluence does not support this function."
    </Location>


    #readonly로접속시 작업자만 Edit 가능하도록 설정
#    RewriteCond "%{REMOTE_ADDR}"       "!^10\.177\.20\.(128|133)"
#    RewriteCond "%{REMOTE_ADDR}"       "!^10\.64\.187\.(202|200)"
#    RewriteCond %{REQUEST_METHOD} ^OPTIONS [NC]
#    RewriteRule ^/readonly/(.*)$ - [F,L]

    ProxyPass           /readonly     http://10.185.157.79:8890/readonly  timeout=600
    ProxyPassReverse    /readonly     http://10.185.157.79:8890/readonly  timeout=600


#history용 설정
#------------------

    # space Admin의 Layout기능 배제
    ProxyPass   /history/spaces/listdecorators.action !

    # space Advanced의 export배제
    ProxyPass   /history/spaces/flyingpdf/flyingpdf.action !
    ProxyPass   /history/spaces/exportspacehtml.action !
    ProxyPass   /history/spaces/exportspacexml.action !

    # Space Admin의 Remove Space배제
    ProxyPass   /history/spaces/removespaces.action !
    ProxyPass   /history/spaces/removespace.action !

    <Location /history/spaces/listdecorators.action>
        ErrorDocument 404 "Confluence does not support this function."
    </Location>
    <Location /history/spaces/flyingpdf/flyingpdf.action>
        ErrorDocument 404 "Confluence does not support this function."
    </Location>
    <Location /history/spaces/exportspacehtml.action>
        ErrorDocument 404 "Confluence does not support this function."
    </Location>
    <Location /history/spaces/exportspacexml.action>
        ErrorDocument 404 "Confluence does not support this function."
    </Location>
    <Location /history/spaces/removespaces.action>
        ErrorDocument 404 "Confluence does not support this function."
    </Location>
    <Location /history/spaces/removespace.action>
        ErrorDocument 404 "Confluence does not support this function."
    </Location>

    RewriteRule ^/history/dologin.action - [L]
    RewriteRule ^/history/doauthenticate.action - [L]
    RewriteRule ^/history/plugins/gliffy/editor.action - [F,L]
    RewriteRule ^/history/pages/editscaffold(.*)  /history/pages/viewpage$1 [L,R=301]
    RewriteRule ^/history/pages/doattachfile(.*)  /history/pages/viewpageattachments$1 [L,R=301]
    RewriteRule ^/history/pages/doaddcomment(.*)  /history/pages/viewpage$1 [L,R=301]

    RewriteCond %{QUERY_STRING} ^spaceKey=(.*)&fromPageId=([0-9]+)(.*)$
    RewriteRule ^/history/pages/createpage\.action$ /history/pages/viewpage.action?pageId=%2 [L,R=301]

    RewriteCond %{QUERY_STRING} ^spaceKey=(.*)$
    RewriteRule ^/history/pages/createblogpost\.action$ /history/display/%1 [L,R=301]

    RewriteCond %{QUERY_STRING} ^key=(.*)$
    RewriteRule ^/history/spaces/editspace\.action$ /history/display/%1? [L,R=301]

    RewriteCond %{QUERY_STRING} ^key=(.*)&openId=([0-9]+)(.*)$
    RewriteRule ^/history/pages/listpages\-dirview\.action$ /history/pages/viewpage.action?pageId=%2 [L,R=301]

    RewriteCond %{QUERY_STRING} ^spaceKey=(.*)&title=(.*)$$
    RewriteRule /history/pages/breadcrumb\.action$ - [F,L]

    RewriteCond %{REQUEST_METHOD} ^POST [NC]
    RewriteRule ^/history/(.*)$ - [F,L]

    RewriteCond %{REQUEST_METHOD} ^DELETE [NC]
    RewriteRule ^/history/(.*)$ - [F,L]

    RewriteCond %{REQUEST_METHOD} ^OPTIONS [NC]
    RewriteRule ^/history/(.*)$ - [F,L]

    ProxyPass           /history     http://10.185.152.56:18494/history
    ProxyPassReverse    /history     http://10.185.152.56:18494/history



    # Test Case 관리용 JIRA 추가
    ProxyPass           /collab-test   http://10.185.152.44:8089/collab-test
    ProxyPassReverse    /collab-test   http://10.185.152.44:8089/collab-test

    # header config가 http https 를 동시에 서비스 할수 없어서, stg 의 headerconfig를 사용하도록 임시 설정
    ProxyPass           /headerConfig   http://10.185.152.38:28607/headerConfig
    ProxyPassReverse    /headerConfig   http://10.185.152.38:28607/headerConfig

    # SDMS FBS와 연동을 위한 same origin policy를 회피책.
    ProxyPass           /cors-helper     http://127.0.0.1:2099/cors-helper
    ProxyPassReverse    /cors-helper     http://127.0.0.1:2099/cors-helper

    RewriteRule   /crowd    http://crowd.lge.com/crowd   [R]

    CustomLog "|/engn001/apache_collab/bin/rotatelogs -l /engn001/apache_collab/logs/access_log.collab.https.%y-%m-%d 86400" logresptime
    ErrorLog "|/engn001/apache_collab/bin/rotatelogs -l /engn001/apache_collab/logs/error_log.collab.https.%y-%m-%d 86400"

</VirtualHost>


<VirtualHost *:443>

    ServerName          collab.lge.com
    DocumentRoot        /engn001/apache_collab/docs

    SSLEngine on
    SSLProxyEngine on
    SSLProxyVerify none
    SSLProxyCheckPeerCN off
    SSLProxyCheckPeerName off

    ## 생성한 SSL 인증서와 개인키
    SSLCertificateFile /engn001/local/ssl/star_lge_com_cert.pem
    SSLCertificateKeyFile /engn001/local/ssl/star_lge_com_key.pem
    SSLCertificateChainFile /engn001/local/ssl/Chain_RootCA_Bundle.crt

    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>

    ProxyPass        / https://collab.lge.com:8061/
    ProxyPassReverse / https://collab.lge.com:8061/

</VirtualHost>
