Wednesday, July 25, 2007

How to Set Apache as Forward Proxy for http/https ?


1. Enable following lines in httpd.conf
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so

2. Add a directive like

ProxyRequests On
AllowCONNECT 80 7002 443

Order deny,allow
Allow from all
AuthType Basic
AuthName "Password Required"
AuthUserFile "C:/Apache2.0/Apache2/passwords/password"
Require user ukamath



3. Need to create password for user using Apache/bin/htpasswd.exe and place it in the file mentioned above.

4. Tell the Firefox/IE that for both http/https the proxy is same that is Apache machine on port 80. You don't need to do anything with SSL for forwarding SSL on apache.

1 comment:

Sam said...

Hi

Nice posting. Could please mention the version of appache that this configuration is applicable.

Can you post the same for apache 2.2
with exact syntax.

Thanks
-Sampath