Re: Problems with M/Monit proxy / redirects

Rui Lapa <[email protected]>
Newsgroups gmane.comp.monitoring.monit.general
Message-ID <CAKDZGSxMFoBg0MP9+hyHuYTRTWVCiFtY3FDD4zb9YhSSX3imfQ@mail.gmail.com>
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" <[email protected]> wrote:

> Nobody? How can I request the M/Monit support?
>
> On Fri, Sep 1, 2017 at 6:53 PM, Jorge Pereira <[email protected]> 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_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
>>
>
>
>
> --
> --
> Jorge Pereira
>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general
>

-- 
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.