Friday, September 20, 2013

Steps to setup Apache reverse proxy on Window 7

1. Download Apache web server for Windows binary and install it.
2. In httpd.conf, update the listening port number
Listen 7000
3. uncomment the following lines to load the required modules
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule ssl_module modules/mod_ssl.so
4. enable virtual host by uncomment the following line
Include conf/extra/httpd-vhosts.conf
5. Edit : conf\httpd-vhosts.conf, for example, the following settings can be used to redirect request
from
torn004613401a.dhcp.tor2.sap.corp:7000/proxy/entity/odata
to
torn00461340a.dhcp.tor2.sap.corp/entity/odata, 


NameVirtualHost *:7000
<VirtualHost *:7000>
    ServerName torn00461340a.dhcp.tor2.sap.corp
    ServerAlias dymmyhost
    ErrorLog "logs/dummy-host.dhcp.tor2.sap.corp-error.log"
    CustomLog "logs/dummy-host.dhcp.tor2.sap.corp-access.log" common
    ProxyPass /proxy/ http://torn00461340a.dhcp.tor2.sap.corp/
    ProxyPassReverse /proxy/ http://torn00461340a.dhcp.tor2.sap.corp/

</VirtualHost>

Note extra steps are required to handle cookie path and domain and https connection.

4 comments:

  1. I am hoping the same best work from you in the future as well. In fact your creative writing abilities may inspired others.
    FileCrop UK proxy

    ReplyDelete
  2. for other people who do not know what that means reverse proxy I share with them this video what is reverse proxy

    ReplyDelete
  3. i want to use reverse proxy from laptop to another server. installed apache haus 2.4 unable to find the solution need anybody help...

    ReplyDelete