Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I’m working on a Spring Boot application and I need to use a reverse proxy to redirect 8080 to 443 so I can access like https://example.com but I don’t seem to get the correct configuration and I keep getting a 500 error.
After a lot of searching I’m not able to find the root of the error. While reading I came up with the following configuration in /etc/apache2/sites-available/000-default.conf (letsencrypt edited the last few lines of each virtual host).
I already have ssl and proxy modules loaded. If I run a2ensite default-ssl then I get the apache page with https. I tried migrating my config to that file but still fails but only when adding this line: ProxyPass / http://example.com:8080/, other configuration still loads the apache website.
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
Redirect permanent / https://example.com/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ProxyRequests Off
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.mysite.com [OR]
RewriteCond %{SERVER_NAME} =mysite.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<VirtualHost *:443>
ServerName example.com
ServerAlias www.example.com
SSLEngine on
SSLProxyEngine on
ProxyRequests off
ProxyPreserveHost on
ProxyPass / http://example.com:8080/
ProxyPassReverse / http://example.com:8080/
SSLProtocol All -SSLv2 -SSLv3
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/example.com-0001/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.com-0001/privkey.pem
</VirtualHost>
What am I missing?
BTW: accessing http://example.com:8080 works fine
b4dbf29d32f847318da467ebae7220
Sen Wang
4d93f2f07ce540cbb84c4d97e835bc
jajaen
14ed7f5e756d40a9971bfff98e543a
14ed7f5e756d40a9971bfff98e543a
75661e8e526d4284a527b3ccb913ca
swapat3