Sunday, December 13, 2015

nginx local proxy




I wanted just a simple nginx setup to forward to a local app.  Here's the result:


http {
...

    server {
      server_name  52.62.72.255;
      #access_log   /var/log/nginx/histories.log;
      location / {
        proxy_pass      http://127.0.0.1:3000;
      }
    }



For some reason it was hard to find this info!  I had to pull it from one of my other servers.  But one good example is this reference: http://wiki.nginx.org/FullExample