0

`Hi, I have a network setup with one machine having public ip this is my httpd machine(rhel8). and other machines with private ips(rhel8). I am trying to setup httpd as reverse proxy to the machines with private ip. But i am getting a connection timed out in logs and on front end i am getting 503 Service Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. Here are my config

/etc/httpd/conf/httpd.conf

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

/etc/httpd/conf.d/kibana.conf

ProxyPreserveHost On
ProxyPass         /kibana  http://10.0.4.162:5601/kibana nocanon
ProxyPassReverse  /kibana  http://10.0.4.162:5601/kibana
ProxyRequests     Off
RequestHeader set X-Forwarded-Proto "http"
AllowEncodedSlashes NoDecode

# Local reverse proxy authorization override
# Most unix distribution deny proxy by default
# See /etc/apache2/mods-enabled/proxy.conf in Ubuntu
<Proxy http://10.0.4.162:5601/kibana*>
Order deny,allow
Allow from all
</Proxy>

Have run the following commands yum install openssl yum install mod_proxy_html

apachectl configtest gives syntax ok. Please help. All changes required for kibana to work with reverse proxy have been made

Httpd as reverse proxy. Getting connection timed out`

neelam
  • 1

1 Answers1

0

This is a running config I use without problems

<VirtualHost *:80>
   ServerName host.domain.com
   ProxyPass / http://host.domain.com/ keepalive=On retry=5
   ProxyPassReverse / http://host.domain.com/
</VirtualHost>
<VirtualHost *:443>
   ServerName host.domain.com
   SSLProxyEngine On
   SSLCertificateFile /etc/letsencrypt/Clienti/live/host.domain.com/fullchain.pem
   SSLCertificateKeyFile /etc/letsencrypt/Clienti/live/host.domain.com/privkey.pem
   ProxyPass / https://host.domain.com/ keepalive=On retry=5
   ProxyPassReverse / https://host.domain.com/
</VirtualHost>

I have a public Dns with a private zone, so my revProxy "know" how to redirect host.domain.com internally. You should use the IP if you don't know how to or don't have such configurations.

If you don't want to "reverse" all the requests but only for www.your.domain.com/kibana, then you have to use this kind

<VirtualHost *:80>
   ServerName host.domain.com
   ProxyPass "/kibana" "http://host.domain.com/kibana"
   ProxyPassReverse "/kibana" "http://host.domain.com/kibana"
</VistualHost>

Start with this config, revised for your specific cases, and eventually add one at a time other directives