Yes, I have set up URL rewriting to redirect all traffic to HTTPS. Here's my /etc/httpd/conf.d/dr0.conf
:
<VirtualHost *:80>
ServerName dr0.ch
DocumentRoot "/var/www/html/main"
RewriteEngine on
RewriteCond %{SERVER_NAME} =dr0.ch
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
However, I had that exact same configuration on my previous CentOS Stream 8 server and the renewal worked flawlessly for years. Also, certbot --apache
works on this server, so I might theoretically run it every three months to renew the certificate by hand.