httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From A M <>
Subject [users@httpd] Example Apache reverse proxy configuration for HTTPS frontend and several HTTP backends
Date Sat, 07 Mar 2015 22:59:31 GMT
Hello experts,

I am trying to set up a classical frontend HTTPS Apache Reverse Proxy
for a couple of plain backend HTTP servers sitting on a backend private
network. The plaform is Centos 6, the Apache rpm is

I first created three DNS entries, all pointing to the same public IP:

I then generated the SSL cert and key for the frontend host and verified
SSL config was correct (all settings and key/cert were defined inside the
/etc/httpd/conf.d/ssl.conf). The URL ""
replied OK.

I have then set up a forced redirection to port 443 on the mother
server and defined two virtual hosts, in this manner:

NameVirtualHost *:80

<VirtualHost *:80>
     RedirectMatch ^/(.*)$1

<VirtualHost *:80>
     ProxyRequests Off
     ProxyPass / http://appserver1.backend/
     ProxyPassReverse / http://appserver1.backend/

<VirtualHost *:80>
     ProxyRequests Off
     ProxyPass / http://appserver2.backend/
     ProxyPassReverse / http://appserver2.backend/


- If I go to "", I am
correctly ending up at "";

- If I go to "http://appserver1[2]", I arrive to
the backend servers allright, but only via the port 80.

This behaviour is apparently correct, but so far I have not found
the right configuration options needed  to enforce the secure
connection to the backend servers via the reverse proxy (I may
not enable SSL on the backend servers as they are running some
privately managed applications and cannot be tweaked).

Could someone kindly post an example of working configuration
of the same type?

Thanks ahead for any advice!


View raw message