I need to setup monit to communicate over a proxy to a mmonit host with ssl:
mmonit => http://mmonit.com/
monit => http://mmonit.com/monit/
- the mmonit host only accepts https requests with HTTP basic authentication
- monit can not natively use proxying (only via apache reverse proxy)
- the remote proxy uses authentication "Proxy-Authorization"
monit -> local reverse proxy (apache) -> remote proxy with auth -> mmonit[https]
this config is working now (without https/SSL):
## Monit Config # mmonit authentication (will be bypassed as HTTP Header "Authorization" by the proxy...) set mmonit http://user:password@localhost:8080/
## Apache VHost Config <VirtualHost localhost:8080> ServerName www.example.org ProxyRemote * http://proxy.example.org:80 ProxyPass / http://mmonit.example.org:80/collector/ ProxyPassReverse / http://mmonit.example.org:80/collector/ # Proxy authentication string base64 encoded RequestHeader set Proxy-Authorization "Basic dXNlcjpwYXNzd29yZA==" </VirtualHost>
this config is NOT working (with https/SSL):
## Monit Config # mmonit authentication (will be bypassed as HTTP Header "Authorization" by the proxy...) set mmonit https://user:password@localhost:443/
## Apache VHost Config <VirtualHost localhost:443> ServerName www.example.org SSLProxyEngine On ProxyRemote * http://proxy.example.org:80 ProxyPass / https://mmonit.example.org:443/collector/ ProxyPassReverse / https://mmonit.example.org:443/collector/ # Proxy authentication string base64 encoded RequestHeader set Proxy-Authorization "Basic dXNlcjpwYXNzd29yZA==" </VirtualHost>
there is no problem by using wget to access https links with the remote proxy, even if the remote proxy doesn't use https => proxy.example.org:80 [http]
how can I get this with https/SSL to work? =/