Setting up a reverse proxy using Apache in Ubuntu:
1. Install reverse_proxy module
sudo apt-get install libapache2-mod-proxy-html
2. Install libxml if it is not already installed.
apt-get install libxml2-dev
3. Load the modules in apache2.conf file
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so
LoadModule headers_module /usr/lib/apache2/modules/mod_headers.so
LoadModule deflate_module /usr/lib/apache2/modules/mod_deflate.so
LoadFile /usr/lib/libxml2.so
4. Say you want to forward all requests starting with /foo to http://moo.com then add the following to your apache2.conf file
ProxyPass /foo/ http://moo.com/
5. Bounce Apache and you are good to go.
By default Ubuntu uses the mods-available / mods-enabled structure. mods-available files are supplied with the package, so simply make symbolic links to the files in mods-enabled folder, instead of loading them directly in the configuration file.
Thanks for that.
In copy-pastable;;;
sudo apt-get install libapache2-mod-proxy-html
apt-get install libxml2-dev
cd /etc/apache2/mods-enabled
for A in ../mods-available/proxy*; do ln -s $A; done
/etc/init.d/apache2 restart
libapache2-mod-proxy-html does not contain the file mod_proxy.so, check with:
dpkg -S /usr/lib/apache2/modules/mod_proxy.so
its also enabled by default.
you just need to configure:
/etc/apache2/modes_enabled/proxy_mod.conf
my fault, its not enabled by default. do that with:
cd /etc/apache/mods-available
sudo ln -s ../mods-available/proxy.conf .
sudo a2enmod proxy
If some one desires expert view concerning blogging then i suggest him/her to
pay a quick visit this website, Keep up the
nice job.
What’s up colleagues, good piece of writing and fastidious arguments commented here, I am in fact enjoying by these.
A fascinating discussion is definitely worth comment.
I think that you ought to write more on this subject matter,
it may not be a taboo subject but generally folks don’t discuss these subjects. To the next! All the best!!
Hello! Do you know if they make any plugins to protect against hackers?
I’m kinda paranoid about losing everything I’ve worked hard on.
Any tips?
Your cranium must be pritectong some very valuable brains.
“Hey! I know this is kind of off topic but I was wondering if you knew where I could find a captcha plugin for my comment form? I’m using the same blog platform as yours and I’m having problems finding one? Thanks a lot!”
The six-pack abs workouts are made to give you an
superb workout in your stomach area.
If some onee needs expert view regarding running a blog
then i recommend him/her tto pay a quick visit this weblog,
Keepp up the nice job.