NGINX as a reverse proxy for multiple domains

The NGINX docs makes them simple to understand, though bloated for most use cases.. I modified the simple example they provide, which should work fine for your use case here:


Code:
server { # simple reverse-proxy

    listen       80;

    server_name  domain2.com www.domain2.com;

    access_log   logs/domain2.access.log  main;

 

    # pass requests for dynamic content to rails/turbogears/zope, et al

    location / {

      proxy_pass      http://127.0.0.1:8080;

    }

  }
 
I may just end up with an
Code:
http://myservers.com/app1
http://myservers.com/app2
http://myservers.com/app3
scenario - probably easier to manage as well.
I followed and altered this config to suit my needs

 
Top
Sign up to the MyBroadband newsletter
X