From 62428777b7862720c1441e126a26f53c6076ba94 Mon Sep 17 00:00:00 2001 From: Martin Michalec Date: Thu, 22 Oct 2026 23:20:17 +0300 Subject: feat: add cosmos site --- roles/cosmos/templates/nginx.conf.j2 | 71 ++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 roles/cosmos/templates/nginx.conf.j2 (limited to 'roles/cosmos/templates/nginx.conf.j2') diff --git a/roles/cosmos/templates/nginx.conf.j2 b/roles/cosmos/templates/nginx.conf.j2 new file mode 100644 index 0000000..b9b6c67 --- /dev/null +++ b/roles/cosmos/templates/nginx.conf.j2 @@ -0,0 +1,71 @@ +# -*- Nginx -*- +# {{ ansible_managed }} + +server { + listen 80; + listen [::]:80; + server_name cosmos.party + www.cosmos.party + git.cosmos.party + lists.cosmos.party + andr.cosmos.party; + + location ^~ /.well-known/acme-challenge/ { + root /var/www/acme; + } + + location / { + return 307 https://$host$request_uri; + } +} + +server { + server_name cosmos.party + www.cosmos.party; + + listen unix:/var/run/nginx/http.sock; + listen 443 ssl; + listen [::]:443 ssl; + listen 443 quic; + listen [::]:443 quic; + + http2 on; + http3 on; + + add_header Alt-Svc 'h3=":443"; ma=86400'; + + ssl_certificate /etc/ssl/cosmos.party.fullchain.pem; + ssl_certificate_key /etc/ssl/private/cosmos.party.key; + ssl_protocols TLSv1.2 TLSv1.3; + + root /srv/http/cosmos.party; + index index.html; + + location /en/ { try_files $uri $uri/ =404; } + location /ru/ { try_files $uri $uri/ =404; } + location /sk/ { try_files $uri $uri/ =404; } + location / { try_files $uri /en$uri /en$uri/ =404; } +} + +server { + server_name andr.cosmos.party; + + + listen unix:/var/run/nginx/http.sock; + listen 443 ssl; + listen [::]:443 ssl; + listen 443 quic; + listen [::]:443 quic; + + http2 on; + http3 on; + + ssl_certificate /etc/ssl/cosmos.party.fullchain.pem; + ssl_certificate_key /etc/ssl/private/cosmos.party.key; + ssl_protocols TLSv1.2 TLSv1.3; + + add_header Alt-Svc 'h3=":443"; ma=86400'; + + root /srv/http/$host; + autoindex on; +} -- cgit v1.3.1