diff --git a/roles/httpd/reverseproxy/templates/reversepassproxy.mirrormanager-redirector.conf b/roles/httpd/reverseproxy/templates/reversepassproxy.mirrormanager-redirector.conf index 685df1898d..1b84955416 100644 --- a/roles/httpd/reverseproxy/templates/reversepassproxy.mirrormanager-redirector.conf +++ b/roles/httpd/reverseproxy/templates/reversepassproxy.mirrormanager-redirector.conf @@ -10,8 +10,11 @@ RewriteRule (.*) - [F] RewriteRule ^/$ https://getfedora.org/ [R=302,L] -RewriteRule ^/pub/epel/7Server/(.+) http://localhost:10002/mirrorlist?path=pub/epel/7/$1&redirect=1 [P,QSA,L] -RewriteRule ^/(.+) {{proxyurl}}/mirrorlist?path=$1&redirect=1 [P,QSA,L] -RewriteRule ^/$ {{proxyurl}}/mirrorlist?path=pub/fedora/linux/&redirect=1 [P,QSA,L] +# http connection, return http mirrors +RewriteCond %{HTTPS} "off" +RewriteRule ^/(.+) http://localhost:10002/mirrorlist?path=$1&redirect=1&protocol=http [P,QSA,L] +# https connection, return https mirrors +RewriteCond %{HTTPS} "on" +RewriteRule ^/(.+) http://localhost:10002/mirrorlist?path=$1&redirect=1&protocol=https [P,QSA,L] ProxyPassReverse / {{proxyurl}}/