Problems with M/Monit proxy / redirects

Jorge Pereira <[email protected]>
Newsgroups gmane.comp.monitoring.monit.general
Message-ID <CADAT-=Sbw0_jZ3p-Y-VA9tjb8tqzBrP9=3ywHrOW_jFSS9HFcg@mail.gmail.com>
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_pass http://mmonit.internal.lan:8080;
    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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.