1
1
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2025-01-18 08:06:16 +01:00
infrastructure/roles/dbscripts/templates/nginx.d.conf.j2
Jan Alexander Steffens (heftig) 7eda0eb8dd
nginx: Unify http and https servers
Where http does not redirect to https. These are package mirrors and
the web key directory.
2019-09-05 20:50:34 +02:00

30 lines
786 B
Django/Jinja

server {
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name {{ repos_domain }} {{repos_rsync_domain}};
root /srv/ftp;
include snippets/letsencrypt.conf;
ssl_certificate /etc/letsencrypt/live/{{ repos_domain }}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{ repos_domain }}/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/{{ repos_domain }}/chain.pem;
satisfy any;
access_log /var/log/nginx/{{ repos_domain }}/access.log reduced;
location /lastupdate {
allow all;
}
location / {
auth_basic "Restricted";
auth_basic_user_file auth/dbscripts.htpasswd;
autoindex on;
}
}