Tuesday, December 25, 2012
How to Implement Reverse Proxy With Mod Security
This post is related to the project that i did with Mod_Security & Reverse Proxy , you can refer to this post that i already describe the details of "How To Install Mod_Security On Apache(Ubuntu 12.10) Step By Step Tutorial For Beginners".
In this post i will give the example configuration for the "reverse proxy" of the same project that i mention above:
First you need to run following command to install and enable the Reverse Proxy.
sudo a2enmod proxy proxy_http
Now you have to go to the following path for changing the configuration of the reverse proxy.
/etc/apache2/sites-available.
Change the content of file with following lines:
<VirtualHost *:80>
ServerAdmin [email protected]
ServerAlias www.myexample.net
ServerName myexample.net
ErrorLog /var/log/apache2/example-error.log
LogLevel info
CustomLog /var/log/apache2/example-access.log combined
ProxyPreserveHost On
ProxyRequests off
# Allow from everywhere
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
# Send all requests to port 1122
ProxyPass /audit !
ProxyPass / http://10.10.150.4:80/
ProxyPassReverse / http://10.10.150.4:80/
</VirtualHost>
This configuration will get any request on port 80 and forward them on http://10.10.150.4:80. And as we had a php script inside this machine and we need to open that from this machine not the destination machine so we need to make a exception for that directory. "ProxyPass /audit !" will stop reverse proxy to forward requests related to /audit/ directory to the destination machine and will run it from the current machine!
Now by running the following command restart the Apache to changes take effect:
sudo service apache2 restart
And this is the video of this project that i describes the details about how this project works.
http://www.youtube.com/watch?v=o3-KDD7TSrA
Subscribe to:
Post Comments (Atom)
This comment has been removed by the author.
ReplyDeleteA debt of gratitude is in order for the blog entry amigo! Keep them coming... vpn
ReplyDeleteNew site is solid. A debt of gratitude is in order for the colossal exertion. best hytale mod
ReplyDeleteAwesome article, it was exceptionally helpful! I simply began in this and I'm becoming more acquainted with it better! Cheers, keep doing awesome! 代理翻墙软件
ReplyDeleteExcellent Blog! I would like to thank for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well. I wanted to thank you for this websites! Thanks for sharing. Great websites! vpn 翻墙
ReplyDeleteIt should be noted that whilst ordering papers for sale at paper writing service, you can get unkind attitude. In case you feel that the bureau is trying to cheat you, don't buy term paper from it. 中国 vpn
ReplyDelete中国 vpn
I like your post and I think I have seen some website which is similar to yours:
ReplyDelete中国 vpn
The other kind of catch mod is known as a trigger catch mod. Essentially, this kind of regulator permits you to utilize the catches to turn on the actual mod, just as change modes. KineMaster Mod APk
ReplyDeleteExpressVPN is a well-regarded VPN软件 used by many people – but how well does it actually perform?
ReplyDeleteI would recommend another one which is similar to your website:
ReplyDelete梯子
There are a great number of internet based companies that use to sell such proxies to other people for their home or work use. visit our website
ReplyDeleteVPN中囯 和 VPN中囯 是最棒的網站
ReplyDelete