# Azure Quiz — HTTPS (after certbot certonly --webroot or certbot --apache) # Certbot usually creates /etc/httpd/conf.d/azure-quiz-le-ssl.conf # If you edit by hand, use this pattern. WRONG patterns cause https://host// : # # BAD: RewriteRule ^ https://www.azure.devopsedu.click/ [R=301,L] # plus a rule that also adds %{REQUEST_URI} or /$1 when $1 is / # BAD: RewriteRule ^(.*)$ https://www.azure.devopsedu.click/$1 [R=301,L] # (for URI "/", $1 can be "/" → double slash) # # GOOD: one redirect using host + request-uri only: # RewriteCond %{HTTPS} off # RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NE] ServerName azure.devopsedu.click ServerAlias www.azure.devopsedu.click SSLEngine on # SSLCertificateFile /etc/letsencrypt/live/azure.devopsedu.click/fullchain.pem # SSLCertificateKeyFile /etc/letsencrypt/live/azure.devopsedu.click/privkey.pem # Include /etc/letsencrypt/options-ssl-apache.conf ProxyPreserveHost On ProxyRequests Off RewriteEngine On RewriteCond %{REQUEST_URI} ^(.*)/{2,}(.*)$ RewriteRule ^ %1/%2 [R=301,L,NE] ProxyPass / http://127.0.0.1:3080/ ProxyPassReverse / http://127.0.0.1:3080/ ErrorLog /var/log/httpd/azure-quiz-ssl-error.log CustomLog /var/log/httpd/azure-quiz-ssl-access.log combined