Problems with M/Monit proxy / redirects

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems with M/Monit proxy / redirects

Jorge Pereira
Hi,

I created a public NGINX instance https://mmonit.mycompany.com/ proxying to https://mmonit.internal.zen.

The problem is happening when I access the https://mmonit.mycompany.com/ then am redirected to the https://mmonit.internal.lan
Nginx

server {
  server_name mmonit.mycompany.com
  ...
  location / {
    proxy_set_header   Proxy-Connection "Keep-Alive";
    proxy_set_header   Upgrade $http_upgrade;
    proxy_set_header   Connection 'upgrade';
    proxy_set_header   X-Real-IP       $remote_addr;
    proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header   REMOTE_ADDR $remote_addr;
    proxy_cache_bypass $http_upgrade;
    proxy_pass_header  Server;

    proxy_http_version 1.1;
  }
  ........
}

My M/Monit 3.7.1 setup.

 <Service>
     <Connector proxyScheme="https"
                proxyName="mmonit.internal.lan"
                proxyPort="443"
                address="*"
                port="8080"
                processors="10"
                processorTimeout="60"
      />

     <Engine name="mmonit" defaultHost="mmonit.internal.lan" fileCache="100MB">
         <Realm url="mysql://................. />
         <ErrorLogger directory="/var/log/mmonit/" fileName="error.log" rotate="week" />
         <Host name="mmonit.internal.lan" address="*" appBase="." >
             <AccessLogger directory="/var/log/mmonit/" fileName="mmonit_access.log" rotate="week" />
             <Logger directory="/var/log/mmonit/" fileName="mmonit.log" rotate="week" timestamp="true" />
             <Context path="" docBase="docroot" sessionTimeout="1800" maxActiveSessions="4096" saveSessions="true" />
             <Context path="/collector" docBase="docroot/collector" sessionTimeout="1800" maxActiveSessions="4096" saveSessions="true" />
         </Host>
     </Engine>
 </Service>

Any clue? suggestions?

--
Jorge Pereira

--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: Problems with M/Monit proxy / redirects

Jorge Pereira
Nobody? How can I request the M/Monit support?

On Fri, Sep 1, 2017 at 6:53 PM, Jorge Pereira <[hidden email]> wrote:
Hi,

I created a public NGINX instance https://mmonit.mycompany.com/ proxying to https://mmonit.internal.zen.

The problem is happening when I access the https://mmonit.mycompany.com/ then am redirected to the https://mmonit.internal.lan
Nginx

server {
  server_name mmonit.mycompany.com
  ...
  location / {
    proxy_set_header   Proxy-Connection "Keep-Alive";
    proxy_set_header   Upgrade $http_upgrade;
    proxy_set_header   Connection 'upgrade';
    proxy_set_header   X-Real-IP       $remote_addr;
    proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header   REMOTE_ADDR $remote_addr;
    proxy_cache_bypass $http_upgrade;
    proxy_pass_header  Server;

    proxy_http_version 1.1;
  }
  ........
}

My M/Monit 3.7.1 setup.

 <Service>
     <Connector proxyScheme="https"
                proxyName="mmonit.internal.lan"
                proxyPort="443"
                address="*"
                port="8080"
                processors="10"
                processorTimeout="60"
      />

     <Engine name="mmonit" defaultHost="mmonit.internal.lan" fileCache="100MB">
         <Realm url="mysql://................. />
         <ErrorLogger directory="/var/log/mmonit/" fileName="error.log" rotate="week" />
         <Host name="mmonit.internal.lan" address="*" appBase="." >
             <AccessLogger directory="/var/log/mmonit/" fileName="mmonit_access.log" rotate="week" />
             <Logger directory="/var/log/mmonit/" fileName="mmonit.log" rotate="week" timestamp="true" />
             <Context path="" docBase="docroot" sessionTimeout="1800" maxActiveSessions="4096" saveSessions="true" />
             <Context path="/collector" docBase="docroot/collector" sessionTimeout="1800" maxActiveSessions="4096" saveSessions="true" />
         </Host>
     </Engine>
 </Service>

Any clue? suggestions?

--
Jorge Pereira



--
--
Jorge Pereira

--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: Problems with M/Monit proxy / redirects

Rui Lapa
https://mmonit.com/documentation/mmonit_manual.pdf
Page 84

Maybe use http on the inside might also help.

On Sep 4, 2017 22:34, "Jorge Pereira" <[hidden email]> wrote:
Nobody? How can I request the M/Monit support?

On Fri, Sep 1, 2017 at 6:53 PM, Jorge Pereira <[hidden email]> wrote:
Hi,

I created a public NGINX instance https://mmonit.mycompany.com/ proxying to https://mmonit.internal.zen.

The problem is happening when I access the https://mmonit.mycompany.com/ then am redirected to the https://mmonit.internal.lan
Nginx

server {
  server_name mmonit.mycompany.com
  ...
  location / {
    proxy_set_header   Proxy-Connection "Keep-Alive";
    proxy_set_header   Upgrade $http_upgrade;
    proxy_set_header   Connection 'upgrade';
    proxy_set_header   X-Real-IP       $remote_addr;
    proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header   REMOTE_ADDR $remote_addr;
    proxy_cache_bypass $http_upgrade;
    proxy_pass_header  Server;

    proxy_http_version 1.1;
  }
  ........
}

My M/Monit 3.7.1 setup.

 <Service>
     <Connector proxyScheme="https"
                proxyName="mmonit.internal.lan"
                proxyPort="443"
                address="*"
                port="8080"
                processors="10"
                processorTimeout="60"
      />

     <Engine name="mmonit" defaultHost="mmonit.internal.lan" fileCache="100MB">
         <Realm url="mysql://................. />
         <ErrorLogger directory="/var/log/mmonit/" fileName="error.log" rotate="week" />
         <Host name="mmonit.internal.lan" address="*" appBase="." >
             <AccessLogger directory="/var/log/mmonit/" fileName="mmonit_access.log" rotate="week" />
             <Logger directory="/var/log/mmonit/" fileName="mmonit.log" rotate="week" timestamp="true" />
             <Context path="" docBase="docroot" sessionTimeout="1800" maxActiveSessions="4096" saveSessions="true" />
             <Context path="/collector" docBase="docroot/collector" sessionTimeout="1800" maxActiveSessions="4096" saveSessions="true" />
         </Host>
     </Engine>
 </Service>

Any clue? suggestions?

--
Jorge Pereira



--
--
Jorge Pereira

--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general