jump to navigation

Setting up apache forward proxy with basic authentication June 7, 2011

Posted by maxmil in : Uncategorized , trackback

To set up an apache forward proxy with username password authentication you need to add something like this to a catch all virtual host. If apache is only listening on port 80 this would be your default virtual host.

ProxyRequests on
<Proxy *>
Order deny,allow
Allow from all
AuthType Basic
AuthName "Password Required"
AuthUserFile /etc/apache2/proxy.passwd
Require valid-user

You must obviously have mod_proxy activated in your apache.

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

To create the password file and add a user alice do

htpasswd -c /etc/apache2/proxy.passwd alice


no comments yet - be the first?