差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

tech:sslproxypass [2012/04/09 16:58] – 建立 jonathantech:sslproxypass [2012/04/09 17:26] (目前版本) jonathan
行 1: 行 1:
 +====== 設定 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<file>
 +:
 +LoadModule proxy_module modules/mod_proxy.so
 +:
 +LoadModule proxy_http_module modules/mod_proxy_http.so
 +:
 +</file>
 +  * /etc/httpd/conf.d/proxypass.conf<file>
 +<IfModule mod_proxy.c>
 +ProxyRequests Off
 +
 +<Proxy https://192.168.11.250/repos/>
 +    Order deny,allow
 +    Allow from all
 +</Proxy>
 +
 +# Set TCP/IP network buffer size for better throughput (bytes)
 +ProxyReceiveBufferSize 4096
 +:
 +</IfModule>
 +# End of proxy directives.
 +:
 +:
 +ProxyPass       /repos/ https://192.168.11.250/repos/
 +ProxyPassReverse /repos/ https://192.168.11.250/repos/
 +:
 +</file>
 +  * /etc/httpd/conf.d/ssl.conf<file>
 +:
 +SSLSessionCache         shmcb:/var/cache/mod_ssl/scache(512000)
 +:
 +SSLEngine on
 +SSLProxyEngine on
 +:
 +</file>
 +
 +===== 內部 SVN 主機設定 =====
 +  * /etc/httpd/conf.d/subversion.conf<file>
 +:
 +      SSLRequireSSL
 +
 +      AuthType Basic
 +      AuthName "Authorization Realm"
 +      AuthUserFile /var/www/passwdfile
 +      Require valid-user
 +</Location>
 +:
 +</file>
 +
 +===== 參考網址 =====
 +  * http://blogs.adobe.com/cguerrero/2010/10/27/configuring-a-reverse-proxy-with-apache-that-handles-https-connections/
 +
 +{{tag>SSL ProxyPass SVN}}