mirror of
https://gitlab.archlinux.org/archlinux/infrastructure.git
synced 2026-09-19 14:39:15 +02:00
these are all the systems that the new redirect snippet can be cleanly applied to. there are a few others not included, that will need a more manual approach: - gitlab (multiple domains) - mta.sts(multiple domains) - archweb(mutltiple domains, snippets) - buildbtw(dynamic dev domains) - redirects(different structure) - public html(multiple domains) - archweb maintenence(different structure) - maintenence(different structure) some of these might be solvable by tweaking the snippet to accept multiple domains. I'll look into this Co-authored-by: Christian Heusel <christian@heusel.eu>
50 lines
1.9 KiB
Django/Jinja
50 lines
1.9 KiB
Django/Jinja
include snippets/redirect-80.conf;
|
|
|
|
server {
|
|
include snippets/listen-443.conf;
|
|
server_name {{ keycloak_domain }};
|
|
|
|
access_log /var/log/nginx/{{ keycloak_domain }}/access.log reduced;
|
|
access_log /var/log/nginx/{{ keycloak_domain }}/access.log.json json_reduced;
|
|
error_log /var/log/nginx/{{ keycloak_domain }}/error.log;
|
|
|
|
acme_certificate letsencrypt;
|
|
ssl_certificate $acme_certificate;
|
|
ssl_certificate_key $acme_certificate_key;
|
|
|
|
root {{ keycloak_domain }};
|
|
|
|
# https://w3c.github.io/webappsec-change-password-url/
|
|
location = /.well-known/change-password {
|
|
return 302 https://$server_name/realms/archlinux/account/#/security/signingin;
|
|
}
|
|
|
|
location ~ /realms/[a-z]+/metrics {
|
|
auth_basic "Prometheus exporter";
|
|
auth_basic_user_file {{ keycloak_nginx_htpasswd }};
|
|
|
|
access_log /var/log/nginx/{{ keycloak_domain }}/access.log main;
|
|
access_log /var/log/nginx/{{ keycloak_domain }}/access.log.json json_main;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_pass http://127.0.0.1:{{ keycloak_port }};
|
|
}
|
|
|
|
location / {
|
|
access_log /var/log/nginx/{{ keycloak_domain }}/access.log main;
|
|
access_log /var/log/nginx/{{ keycloak_domain }}/access.log.json json_main;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_pass http://127.0.0.1:{{ keycloak_port }};
|
|
proxy_buffer_size 8k;
|
|
}
|
|
|
|
location = / {
|
|
return 301 https://$server_name/realms/archlinux/account;
|
|
}
|
|
}
|