[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [monit] changing relative paths of monit web server

From: Martin Pala
Subject: Re: [monit] changing relative paths of monit web server
Date: Tue, 13 Nov 2007 21:48:09 +0100

Monit 4.9 and later should support setup behind reverse proxy (the URLs are relative since this version).

Sample proxy configuration for Apache:
  ProxyPass /monit/ http://localhost:2812/
  ProxyPassReverse /monit/ http://localhost:2812/
  <Location /monit/>
    AllowOverride None
    AuthType Basic
    AuthName sysadmin
    AuthUserFile /etc/httpd/passwd
    require valid-user


On Nov 13, 2007, at 3:16 PM, Simon Mullis wrote:

Hi All.

Is there a way to explicitly set the relative URL path for the monit web server?

I want to be able to expose the monit web server via a reverse proxy
(in this case nginx).

The nginx.conf entry:

location /path/to/monit {
    rewrite ^/path/to/monit/(.*) /$1 break;

The html created by the monit web server has all of its hrefs as
coming from the root.

So, we have links of the form: <a href='/mysqld'>mysqld</a>

I would like to have links created based on a relative path:

<a href='/path/to/monit/mysqld'>mysqld</a>

Looking at the source - specifically the config parser (p.y) - I don't
see this as an option:

sethttpd        : SET HTTPD PORT NUMBER httpdlist {
                   Run.dohttpd= TRUE;
                   Run.httpdport= $4;

I'm also looking into doing this with the web server (using
"sub_filter" on nginx) but I'm not convinced that it supports regexes
and capture groups.

Thanks in advance for any help.

Kind Regards


Simon Mullis

To unsubscribe:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]