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.

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
       # Send all requests to port 1122
ProxyPass /audit !
        ProxyPass /
        ProxyPassReverse /

This configuration will get any request on port 80 and forward them on 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.


  1. This comment has been removed by the author.

  2. A debt of gratitude is in order for the blog entry amigo! Keep them coming... vpn

  3. New site is solid. A debt of gratitude is in order for the colossal exertion. best hytale mod

  4. Awesome article, it was exceptionally helpful! I simply began in this and I'm becoming more acquainted with it better! Cheers, keep doing awesome! 代理翻墙软件

  5. Excellent 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 翻墙

  6. It 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
    中国 vpn

  7. I like your post and I think I have seen some website which is similar to yours:
    中国 vpn

  8. 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

  9. ExpressVPN is a well-regarded VPN软件 used by many people – but how well does it actually perform?

  10. 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


Social Networks Sharing