From 3baf4139ac6de8c965816b6b2f653f187411e1bf Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Tue, 24 Nov 2020 20:29:53 +0100 Subject: [PATCH] web_*: cleanup, add VXoWG api endpoint --- host_vars/stats.regensburg.freifunk.net | 2 -- roles/web_gw/templates/vhost.j2 | 7 +++++++ roles/web_stats/templates/vhost.j2 | 9 ++++----- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/host_vars/stats.regensburg.freifunk.net b/host_vars/stats.regensburg.freifunk.net index 8a16921..5132d99 100644 --- a/host_vars/stats.regensburg.freifunk.net +++ b/host_vars/stats.regensburg.freifunk.net @@ -19,8 +19,6 @@ yanic_database_delete_after: 720d yanic_dbc_repondd_enable: false -nginx_ssl: true - yanic_influxdb: - enable: true host: http://127.0.0.1:8086 diff --git a/roles/web_gw/templates/vhost.j2 b/roles/web_gw/templates/vhost.j2 index b73a9a9..e026155 100644 --- a/roles/web_gw/templates/vhost.j2 +++ b/roles/web_gw/templates/vhost.j2 @@ -13,6 +13,11 @@ server { root /var/www/html; + # VXoWG broker API + location /api { + proxy_pass http://localhost:8000/api; + } + # temp redirector server location /move.php { proxy_pass http://home.mephis.to:2342/move.php; @@ -25,6 +30,7 @@ server { location /firmware-ng/stable { proxy_pass http://home.mephis.to:2342/ff/stable/images; } + # post 11s location /firmware-11s/experimental { proxy_pass http://home.mephis.to:2342/ff/11s/experimental/images; @@ -54,6 +60,7 @@ server { location /firmware-ng/stable { proxy_pass http://home.mephis.to:2342/ff/stable/images; } + # post 11s location /firmware-11s/experimental { proxy_pass http://home.mephis.to:2342/ff/11s/experimental/images; diff --git a/roles/web_stats/templates/vhost.j2 b/roles/web_stats/templates/vhost.j2 index 3a5b5a0..f2dc086 100644 --- a/roles/web_stats/templates/vhost.j2 +++ b/roles/web_stats/templates/vhost.j2 @@ -2,14 +2,13 @@ server { listen 80; listen [::]:80; - proxy_set_header X-Forwarded-For $remote_addr; - server_name _; location /.well-known/acme-challenge { default_type "text/plain"; alias /var/www/acme-challenge; } + root /var/www/html; } @@ -18,8 +17,6 @@ server { listen 443 ssl http2; listen [::]:443 ssl http2; - proxy_set_header X-Forwarded-For $remote_addr; - server_name {{ ansible_fqdn }}; ssl_certificate_key /etc/nginx/ssl/{{ ansible_fqdn }}.key; @@ -28,8 +25,10 @@ server { root /var/www/html; location / { - proxy_pass http://localhost:3000/ + proxy_pass http://localhost:3000/; + proxy_set_header X-Forwarded-For $remote_addr; } + location /meshviewer { alias /var/www/html/meshviewer; }