When I type only the domain, it redirects me to https://example.net which is great, but I get this error:
The page isn’t redirecting properly
I don't have any errors in error.log :(
This is the code from 000-default.conf:
<VirtualHost *:80>
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
Redirect permanent / https://example.net/
ServerName www.example.net
</VirtualHost>
Listen 443
NameVirtualHost *:443
<VirtualHost *:443>
SSLEngine On
SSLProxyEngine On
SSLCertificateKeyFile /etc/apache2/ssl/file1.key
SSLCertificateChainFile /etc/apache2/ssl/file2.ca-bundle
SSLCertificateFile /etc/apache2/ssl/file3.crt
ProxyPreserveHost on
RequestHeader set X-Forwarded-Proto https
RequestHeader set X-Forwarded-Port 443
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
ServerName www.example.net
ServerAlias example.net
</VirtualHost>