summaryrefslogtreecommitdiff
path: root/roles/apps/coturn/templates/nginx-vhost.conf.j2
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2020-03-26 03:07:10 +0100
committerChristian Pointner <equinox@spreadspace.org>2020-03-26 03:07:10 +0100
commitedf5603dfadb9aded010412ca1751e1e61cfe642 (patch)
treeca129ca8ea64c6391ea5e1071678ac045d3c54dd /roles/apps/coturn/templates/nginx-vhost.conf.j2
parentadd app coturn (WIP) (diff)
coturn mostly done
Diffstat (limited to 'roles/apps/coturn/templates/nginx-vhost.conf.j2')
-rw-r--r--roles/apps/coturn/templates/nginx-vhost.conf.j227
1 files changed, 27 insertions, 0 deletions
diff --git a/roles/apps/coturn/templates/nginx-vhost.conf.j2 b/roles/apps/coturn/templates/nginx-vhost.conf.j2
new file mode 100644
index 00000000..0639fbe1
--- /dev/null
+++ b/roles/apps/coturn/templates/nginx-vhost.conf.j2
@@ -0,0 +1,27 @@
+server {
+ listen 80;
+ listen [::]:80;
+ server_name {{ coturn_hostnames | join(' ') }};
+
+ include snippets/acmetool.conf;
+
+ location / {
+ return 301 https://$host$request_uri;
+ }
+}
+
+server {
+ listen 443 ssl http2;
+ listen [::]:443 ssl http2;
+ server_name {{ coturn_hostnames | join(' ') }};
+
+ include snippets/acmetool.conf;
+ include snippets/tls.conf;
+ ssl_certificate /var/lib/acme/live/{{ coturn_hostnames[0] }}/fullchain;
+ ssl_certificate_key /var/lib/acme/live/{{ coturn_hostnames[0] }}/privkey;
+ include snippets/hsts.conf;
+
+ location / {
+ return 404;
+ }
+}