mirror of
https://gitlab.archlinux.org/archlinux/infrastructure.git
synced 2026-09-19 11:39:08 +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>
48 lines
1.4 KiB
Django/Jinja
48 lines
1.4 KiB
Django/Jinja
upstream archmanweb {
|
|
server unix:///run/uwsgi/archmanweb.sock;
|
|
}
|
|
|
|
limit_req_zone $binary_remote_addr zone=archmanweb_limit:10m rate=2r/s;
|
|
limit_req_status 429;
|
|
|
|
include snippets/redirect-80.conf;
|
|
|
|
server {
|
|
include snippets/listen-443.conf;
|
|
server_name {{ archmanweb_domain }};
|
|
|
|
access_log /var/log/nginx/{{ archmanweb_domain }}/access.log reduced;
|
|
access_log /var/log/nginx/{{ archmanweb_domain }}/access.log.json json_reduced;
|
|
error_log /var/log/nginx/{{ archmanweb_domain }}/error.log;
|
|
|
|
acme_certificate letsencrypt;
|
|
ssl_certificate $acme_certificate;
|
|
ssl_certificate_key $acme_certificate_key;
|
|
|
|
limit_req zone=archmanweb_limit burst=10 delay=8;
|
|
|
|
location = /favicon.ico {
|
|
alias {{ archmanweb_dir }}/repo/collected_static/archlinux-common/favicon.ico;
|
|
}
|
|
|
|
location = /robots.txt {
|
|
alias {{ archmanweb_dir }}/repo/robots.txt;
|
|
}
|
|
|
|
# Client-cache for Django's static assets
|
|
location /static/ {
|
|
expires 30d;
|
|
include snippets/headers.conf;
|
|
add_header Pragma public;
|
|
add_header Cache-Control "public";
|
|
alias {{ archmanweb_dir }}/repo/collected_static/;
|
|
}
|
|
|
|
location / {
|
|
access_log /var/log/nginx/{{ archmanweb_domain }}/access.log main;
|
|
access_log /var/log/nginx/{{ archmanweb_domain }}/access.log.json json_main;
|
|
include uwsgi_params;
|
|
uwsgi_pass archmanweb;
|
|
}
|
|
}
|