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
+32 -28
View File
@@ -1,48 +1,52 @@
############################################
# config file for bookstack
############################################
upstream bookstack_backend {
server webserver.bookstack.svc;
server 1.1.1.1 backup;
server webserver.bookstack.svc;
server 1.1.1.1 backup;
}
server {
server_name bookstack.tryton.geeraert.eu www.bookstack.tryton.geeraert.eu;
server_name bookstack.tryton.geeraert.eu www.bookstack.tryton.geeraert.eu;
location / {
proxy_pass http://bookstack_backend;
proxy_pass http://bookstack_backend;
location ~* \.(html|css|jpg|gif|ico|js)$ {
proxy_cache cache;
proxy_cache_key $host$uri$is_args$args;
proxy_cache_valid 200 301 302 30m;
expires 30m;
proxy_pass http://bookstack_backend;
}
proxy_cache cache;
proxy_cache_key $host$uri$is_args$args;
proxy_cache_valid 200 301 302 30m;
expires 30m;
proxy_pass http://bookstack_backend;
}
}
location /.well-known/acme-challenge/ {
root /var/www/certbot;
root /var/www/certbot;
}
listen 443 ssl; # managed by Certbot
listen 443 ssl;
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.bookstack.tryton.geeraert.eu) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = www.bookstack.tryton.geeraert.eu) {
return 301 https://$host$request_uri;
}
if ($host = bookstack.tryton.geeraert.eu) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = bookstack.tryton.geeraert.eu) {
return 301 https://$host$request_uri;
}
server_name www.bookstack.tryton.geeraert.eu bookstack.tryton.geeraert.eu;
listen 80;
return 404; # managed by Certbot
listen 80;
return 404;
}