Skip to content

Instantly share code, notes, and snippets.

@noiges
Created May 16, 2014 17:55
Show Gist options
  • Save noiges/ca8f322af8af8e7b1a59 to your computer and use it in GitHub Desktop.
Save noiges/ca8f322af8af8e7b1a59 to your computer and use it in GitHub Desktop.
How to setup a simple proxy with nginx

How to setup a simple nginx proxy

  1. Install nginx: brew install nginx

  2. Add the following to /usr/local/etc/nginx/nginx.conf:

    http {
      ...
      server {
        listen 1234;
        location / {
          proxy_pass http://localhost:5280;
        }
      }
    }
    
  3. Launch nginx: nginx

This will setup a proxy that listens for requests on port 1234 and forwards them to http://localhost:5280.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment