Skip to content
Snippets Groups Projects
Verified Commit 9800d023 authored by Giancarlo Razzolini's avatar Giancarlo Razzolini
Browse files

roles/archweb: Create domain redirects for the domains that point to specific archweb sub urls.

parent 187bb158
No related branches found
No related tags found
No related merge requests found
---
archweb_dir: '/srv/http/archweb'
archweb_domain: 'www.archlinux.org'
archweb_alternate_domains: ['archlinux.org']
archweb_alternate_domains: ['archlinux.org', 'master-key.archlinux.org', 'dev.archlinux.org', 'packages.archlinux.org']
archweb_domains_redirects:
'master-key.archlinux.org': '/master-keys'
'dev.archlinux.org': '/'
'packages.archlinux.org': '/packages'
archweb_site: true
archweb_mirrorcheck: false
archweb_mirrorresolv: false
......
upstream archweb {
server unix:///run/uwsgi/archweb.sock;
}
......@@ -32,7 +33,12 @@ server {
ssl_trusted_certificate /etc/letsencrypt/live/{{ archweb_domain }}/chain.pem;
location / {
rewrite ^(.*) https://{{ archweb_domain }}$1 permanent;
rewrite ^(.*) https://{{ archweb_domain }}
{%- if archweb_domains_redirects -%}
{{ archweb_domains_redirects[domain]|default('$1') }}
{%- else -%}
$1
{%- endif %} permanent;
}
}
{% endfor %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment