Install mod_proxy June 5th, 2008

Had some issues the other day trying to get mod_proxy to work. It seems it doesn't come with the default modules in Apache so I had to go and get it (beware! before installing keep in mind it restarts apache once its done!):
sudo apt-get install libapache2-mod-proxy-html
This is kind of weird naming convention for that module, it took me a while to find it. After placing the correct rules in the VirtualHost I was getting access denied. This is because mod_proxy has a configuration file in /etc/apache2/mods-enabled called proxy.conf that comes with a security rule of:
"Deny All"
You will have to edit this (I changed it to Allow All since I wanted all traffic available) according to your specific situation. Now we need to "enable" the module by doing:
sudo a2enmod proxy
One final reload of Apache and everything was working again:
sudo /etc/init.d/apache2 reload
Posted in server |

6 Responses to “Install mod_proxy”

  1. Barrett On

    Not sure when this info was posted, but mod_proxy comes with ubuntu server. You just have to enable it using "sudo a2enmod proxy" Hope this helps others.

  2. Re@PeR On

    Thanks man, you saved me a lot of time, was having the same problem after eventually figuring out what module was required for proxying via apache.

  3. Jeff On

    Thanks! fyi I had to remember to do a little 'sudo a2enmod proxy' to enable it.

  4. admin On

    I apologize. You are right, I forgot to include the command to enable the module. It could be done with your suggestion, however there is another simple way to do it: sudo a2enmod proxy

  5. Christoph On

    In addition to your helpful hints, I still runned into frustration. Big help was here http://serendipity.ruwenzori.net/index.php/2006/12/24/proxy-no-protocol-handler-was-valid-for-the-url where ln -s /etc/apache2/mods-available/proxy_http.load \ /etc/apache2/mods-enabled/proxy_http.load did the job for me! Thanks all!

  6. Steve On

    Hi,

    As an alternative to Christophs tip, you can use:

    sudo a2enmod proxy_http

    Steve

Leave a Reply

9+10


Living Ubuntu

I discovered Ubuntu in its second release thanks to a PC Magazine Ranking. Haven't stop using GNU/Linux since. This place is where I put all the stuff that I stumble upon and fix later. Hope you find it useful.

Links

Twitter

    Follow Me