Sunday, January 29, 2017

using apache/nginx as reverse proxy server (map to different ports based on domain name)

Assuming nginx is running on port 82 and you want to serve with nginx.

<VirtualHost *:80>
    ProxyPreserveHost On

    # setup the proxy
    <Proxy *>
        Order allow,deny
        Allow from all
    ProxyPass / http://localhost:82/
    ProxyPassReverse / http://localhost:82/

1 comment:

Blogger said...

BlueHost is the best web-hosting company with plans for all of your hosting requirements.

Blog Archive