Force HTTPS on Apache behind Nginx load balancer

How to force HTTPS on Apache with Nginx load balancer

Edit httd.conf

Add the following configuration in the Apache configuration file httd.conf.

<VirtualHost *:80>
...
RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
</VirtualHost>
Last modified February 26, 2026: k8s-1.33-changelog (#253) (ea3be5e)