ServerName example.net RewriteEngine on RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} RewriteCond %{SERVER_NAME} =example.net RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] ServerName example.net ServerAdmin webmaster@example.net DocumentRoot /var/www/html ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined ProxyPreserveHost on ProxyPass / http://localhost:3000/ ProxyPassReverse / http://localhost:3000/ RequestHeader set X_FORWARDED_PROTO 'https' SSLEngine on SSLCertificateFile /etc/ssl/private/wildcard.example.net.crt SSLCertificateKeyFile /etc/ssl/private/wildcard.example.net.key