Redirect fp.o to https://fp.o first, then to getfedora.org but not for hotspot.txt

This reverts commit 80ac144f78.
This commit is contained in:
Patrick Uiterwijk 2018-06-28 11:37:06 +02:00
parent 80ac144f78
commit 424d7c10bb
2 changed files with 6 additions and 1 deletions

View file

@ -48,6 +48,7 @@
- role: httpd/website
site_name: fedoraproject.org
sslonly: true
cert_name: "{{wildcard_cert_name}}"
server_aliases:
- stg.fedoraproject.org

View file

@ -14,10 +14,14 @@
ProxyPass "/.well-known/acme-challenge" "http://certgetter01/.well-known/acme-challenge"
{% endif %}
{% if site_name == "fedoraproject.org" %}
Alias /static/hotspot.txt /srv/web/fedoraproject.org/static/hotspot.txt
{% endif %}
{% if sslonly %}
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !/.well-known/acme-challenge/.*
RewriteCond %{REQUEST_URI} !/static/hotspot.txt
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [NE]
{% else %}
Include "conf.d/{{ site_name }}/*.conf"