monit rewrite

AJ Weber aweber at
Wed Sep 26 19:00:24 UTC 2012

OK, I am positive this is easy for you experienced nginx users!

I have a backend app server setup and am using nginx for 

I would like to use the "default" server (listening on 443) to redirect 
the url https://host/monit to the server's monit-mini-http server (and 
continue to use it for ssl termination).  so I need to direct the 
backend to http://localhost:2812/.

Thus, I think I need a proxy_pass and a rewrite (to basically just 
remove "/monit" from the url (pass the remainder of the url back to 
monit's http server from root).  I was trying to do this inside a 
location /monit { }.

But, of course, I can't get it to work. :(

Any hints?

More information about the nginx mailing list