ServerName mai.example.com ServerAlias mai.example.com RewriteEngine on RewriteCond %{SERVER_NAME} =mai.example.com RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] ServerName mai.example.com ServerAlias mai.example.com SSLEngine on SSLCertificateFile /usr/pkg/etc/letsencrypt/live/example.com/fullchain.pem SSLCertificateKeyFile /usr/pkg/etc/letsencrypt/live/example.com/privkey.pem ProxyRequests off ProxyPass / http://127.0.0.1:5000/ ProxyPassReverse / http://127.0.0.1:5000/ ProxyPreserveHost On