I have a Spring Boot Application that has been set up with SSL handling. I was using iptables rerouting to route all port 80 traffic to the spring boot port 8080 and all 443 traffic to spring boot 8443.
Spring Boot was then redirecting any http traffic to https (443). Everything was working fine.
Now I want to run an Apache2 server and use it to redirect the traffic to Spring Boot instead of using straight up iptables rerouting.
I've creating the following conf file for the site:
<VirtualHost *:80>
ServerAdmin [email protected]
ProxyPreserveHost On
ProxyRequests Off
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
ErrorLog ${APACHE_LOG_DIR}/site/error.log
CustomLog ${APACHE_LOG_DIR}/site/access.log combined
</VirtualHost>
<VirtualHost _default_:443>
ServerAdmin [email protected]
ProxyPreserveHost On
ProxyRequests Off
ProxyPass / https://localhost:8443/
ProxyPassReverse / https://localhost:8443/
ErrorLog ${APACHE_LOG_DIR}/site/error.log
CustomLog ${APACHE_LOG_DIR}/site/access.log combined
</VirtualHost>
But it doesn't seem to be working. I get "This site can’t provide a secure connection". Although redirection from http to https (set up in spring boot) does seem to be working.
Most of the things I found on google show how to configure spring boot behind Apache2, with Apache2 handling ssl. How do I set it up so that it's spring boot that handles the ssl, and Apache just basically does the port mapping. Or would it be less pain to set up Apache to handle ssl?