Apache reverse proxy with ssl not working
14,331
There you go, you have two SSL vhosts with the same ServerName
. This means only the first will get the SSL requests.
Looks like its some form of default vhost in /etc/httpd/conf.d/ssl.conf
which you can remove.
Related videos on Youtube
Author by
SomeGuyOnTheNet
Updated on September 18, 2022Comments
-
SomeGuyOnTheNet almost 2 years
I am trying to use apache(2.4) as an reverse proxy for tomcat(7), which works fine when I use http only.
http config:
<VirtualHost *:80> ServerName abc.domain.org ProxyRequests Off ProxyPreserveHost On <Proxy *> Order allow,deny Allow from all </Proxy> ProxyPass / http://localhost:8080/ ProxyPassReverse / http://localhost:8080/ </VirtualHost>
This works completely fine.
But when I want apache to handle https its not working at all. I tried a lot of things, but I only end up seeing a plane page with "index of /"
https config:
<VirtualHost *:443> ServerName abc.domain.org SSLEngine On SSLCertificateFile path SSLCertificateKeyFile path SSLCertificateChainFile path ProxyRequests Off ProxyPreserveHost On <Proxy *> Order allow,deny Allow from all </Proxy> ProxyPass / http://localhost:8080/ ProxyPassReverse / http://localhost:8080/ </VirtualHost>
Any help or hints would be mouch appreciated.
Edit: If you need any more information, feel free to ask.
Edit2:
Output of apachectl -s:
VirtualHost configuration: *:80 abc.domain.org (/etc/httpd/conf.d/proxy.conf:1) *:443 is a NameVirtualHost default server abc.domain.org (/etc/httpd/conf.d/ssl.conf:56) port 443 namevhost abc.domain.org (/etc/httpd/conf.d/ssl.conf:56) port 443 namevhost abc.domain.org (/etc/httpd/conf.d/proxy.conf:24) ServerRoot: "/etc/httpd" Main DocumentRoot: "/var/www/html" Main ErrorLog: "/etc/httpd/logs/error_log" Mutex proxy-balancer-shm: using_defaults Mutex rewrite-map: using_defaults Mutex authdigest-client: using_defaults Mutex ssl-stapling: using_defaults Mutex proxy: using_defaults Mutex authn-socache: using_defaults Mutex ssl-cache: using_defaults Mutex default: dir="/run/httpd/" mechanism=default Mutex mpm-accept: using_defaults Mutex authdigest-opaque: using_defaults PidFile: "/run/httpd/httpd.pid" Define: DUMP_VHOSTS Define: DUMP_RUN_CFG User: name="apache" id=48 Group: name="apache" id=48
-
SomeGuyOnTheNet over 7 yearsI can confirm that this was the mistake. Thanks for the help. Also thanks to every other poster. Sometimes the mistake is just to obvious -.-