Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
58 lines (35 sloc) 1.54 KB

NOTE: I neither use nor maintain this project anymore.


ez-nginx-proxy is a small wrapper around nginx. It requires nginx to already be installed. It is useful for development, when you want to very easily start a proxy that will send requests to various other development/production servers based on matching the routes.

ez-nginx-proxy takes a very simple Ruby configuration file. Here is an example configuration:

  ["/foo/bar", "localhost:1234"],
  ["/", ""]

If you run this configuration like this:

$ ez-nginx-proxy -p 9000 my_config.rb

ez-nginx-proxy will create a temporary nginx configuration file that redirects localhost:9000/foo/bar to localhost:1234/foo/bar and localhost:9000/blah to


$ ez-nginx-proxy your_config.rb

See ez-nginx-proxy -h for all the options.


Install nginx. You can do this using your favorite package manager:

$ sudo apt-get install nginx
$ brew install nginx
# or whatever

Now install ez-nginx-proxy

$ gem install ez-nginx-proxy


You will probably see this error when ez-nginx-proxy starts:

nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)

This is because nginx initially tries to log to /var/log/nginx/error.log before it starts up. See this nginx config page for more information.


  • nginx regex matching
  • pattern replacement?
  • Hide the annoying 'permission denied' error