adding sites into terraform

This commit is contained in:
2024-07-25 17:56:10 +01:00
parent 3b67e1b3c6
commit 6cc7ace590
16 changed files with 102 additions and 419 deletions
@@ -0,0 +1,41 @@
upstream opentrashmail_backend {
# server opentrashmail.opentrashmail.svc;
server 1.1.1.1;
server 1.1.1.1 backup;
}
server {
server_name opentrashmail.tryton.geeraert.eu www.opentrashmail.tryton.geeraert.eu;
location / {
proxy_pass http://opentrashmail_backend;
}
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/nginx/ssl/live/tryton.geeraert.eu/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/live/tryton.geeraert.eu/privkey.pem;
#include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
#ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = www.opentrashmail.tryton.geeraert.eu) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = opentrashmail.tryton.geeraert.eu) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name www.opentrashmail.tryton.geeraert.eu opentrashmail.tryton.geeraert.eu;
listen 80;
return 404; # managed by Certbot
}