summaryrefslogtreecommitdiff
path: root/roles/apps
diff options
context:
space:
mode:
Diffstat (limited to 'roles/apps')
-rw-r--r--roles/apps/coturn/tasks/main.yml5
-rw-r--r--roles/apps/coturn/templates/nginx-vhost.conf.j227
2 files changed, 4 insertions, 28 deletions
diff --git a/roles/apps/coturn/tasks/main.yml b/roles/apps/coturn/tasks/main.yml
index bab53d99..ed0c06ab 100644
--- a/roles/apps/coturn/tasks/main.yml
+++ b/roles/apps/coturn/tasks/main.yml
@@ -69,10 +69,13 @@
vars:
nginx_vhost:
name: "coturn-{{ coturn_realm }}"
- content: "{{ lookup('template', 'nginx-vhost.conf.j2') }}"
+ template: generic
tls:
certificate_provider: acmetool
hostnames: "{{ coturn_hostnames }}"
+ locations:
+ '/':
+ return: "404"
include_role:
name: nginx/vhost
diff --git a/roles/apps/coturn/templates/nginx-vhost.conf.j2 b/roles/apps/coturn/templates/nginx-vhost.conf.j2
deleted file mode 100644
index 577c33b4..00000000
--- a/roles/apps/coturn/templates/nginx-vhost.conf.j2
+++ /dev/null
@@ -1,27 +0,0 @@
-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 {{ x509_certificate_path_fullchain }};
- ssl_certificate_key {{ x509_certificate_path_key }};
- include snippets/hsts.conf;
-
- location / {
- return 404;
- }
-}