aboutsummaryrefslogtreecommitdiff
path: root/roles/nginx/templates/app.nginx.conf.j2
diff options
context:
space:
mode:
authorKumar <kumar@kumardamani.xyz>2021-11-23 14:59:08 +0000
committerKumar Damani <me@kumardamani.net>2022-03-25 19:45:25 +0000
commita857eb82ec9c4a79ad5e41462e2ab82c2660982e (patch)
tree9ca51ddfb551322bd4d2fa3f949fa8898032632d /roles/nginx/templates/app.nginx.conf.j2
initial commit
Diffstat (limited to 'roles/nginx/templates/app.nginx.conf.j2')
-rw-r--r--roles/nginx/templates/app.nginx.conf.j221
1 files changed, 21 insertions, 0 deletions
diff --git a/roles/nginx/templates/app.nginx.conf.j2 b/roles/nginx/templates/app.nginx.conf.j2
new file mode 100644
index 0000000..c87fe29
--- /dev/null
+++ b/roles/nginx/templates/app.nginx.conf.j2
@@ -0,0 +1,21 @@
+server {
+ listen 443 ssl;
+ root _;
+ server_name {{ item.conf.access_domain }};
+ ssl_certificate /etc/letsencrypt/live/{{ nginx_global_apps_domain }}/fullchain.pem;
+ ssl_certificate_key /etc/letsencrypt/live/{{ nginx_global_apps_domain }}/privkey.pem;
+ ssl_protocols TLSv1.1 TLSv1.2;
+ ssl_ciphers HIGH:!aNULL:!MD5;
+
+ location / {
+ proxy_pass http://127.0.0.1:{{ item.conf.port }};
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Host $server_name;
+ proxy_set_header X-Forwarded-Proto https;
+ proxy_read_timeout 1200s;
+ client_max_body_size 0;
+ error_log /var/log/nginx/{{ item.app }}.error.log;
+ }
+}