Had the same problem. I was running monit 4.8 and running into the same
issues. You need monit 4.9 or later to handle reverse proxying. This
post helped me get monit 4.10 installed without re-compiling from
source: http://route19.com/logbook/view/monit-410-on-ubuntu-804.
Can nginx do that? or we need to modify monit?
So the answer is yes, nginx can do this with the proper version of
monit. Here’s the relevant nginx set-up that worked for me:
my config (nginx replaces location uri with proxy_pass uri, if you
specified it after proxy hostname or proxy port) :
location /monit/ {
allow ;
deny all;
sub_filter_once off;
sub_filter "a href='/" "a href='/monit/";
proxy_pass http://127.0.0.1:2812/; # pass query to backend
as is
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
So, to replace wrong links I’ve used sub_filter directive. To use it
nginx must be recompiled with --with-http_sub_module (see if you already
have it - nginx -V).
With all of this configuration only on “_about” screen is the bug. Do
you need often see _about page ?
Proklyatiy yazikivoi barrier…
Posted at Nginx Forum:
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.