====== 設定 SSL 通過 ProxyPass 的方式 ======
因為限制 svn 必須使用 SSL (https), 但當 SVN Server 安裝在內部主機, 透過外部的 ProxyPass 方式轉入存取, 就會出現 ProxyPass 無法透過標準方式設定的問題。
===== 環境與目標說明 =====
* 外部 ProxyPass 主機 : xen-www - CentOS 5.8 i386
* 內部 SVN 主機 : c2q-q9400 (192.168.11.250) - CentOS 5.8 x86_64
* 希望達成
* http://xxx.ichiayi.com/repos/xxx 不可存取
* https://xxx.ichiayi.com/repos/xxx 可以存取 https://192.168.11.250/repos/xxx
===== 外部 ProxyPass 主機設定 =====
* /etc/httpd/conf/httpd.conf
:
LoadModule proxy_module modules/mod_proxy.so
:
LoadModule proxy_http_module modules/mod_proxy_http.so
:
* /etc/httpd/conf.d/proxypass.conf
ProxyRequests Off
Order deny,allow
Allow from all
# Set TCP/IP network buffer size for better throughput (bytes)
ProxyReceiveBufferSize 4096
:
# End of proxy directives.
:
:
ProxyPass /repos/ https://192.168.11.250/repos/
ProxyPassReverse /repos/ https://192.168.11.250/repos/
:
* /etc/httpd/conf.d/ssl.conf
:
SSLSessionCache shmcb:/var/cache/mod_ssl/scache(512000)
:
SSLEngine on
SSLProxyEngine on
:
===== 內部 SVN 主機設定 =====
* /etc/httpd/conf.d/subversion.conf
:
SSLRequireSSL
AuthType Basic
AuthName "Authorization Realm"
AuthUserFile /var/www/passwdfile
Require valid-user
:
===== 參考網址 =====
* http://blogs.adobe.com/cguerrero/2010/10/27/configuring-a-reverse-proxy-with-apache-that-handles-https-connections/
{{tag>SSL ProxyPass SVN}}