diff --git a/50x.html b/50x.html index 2214a36c..bb3a04d7 100644 --- a/50x.html +++ b/50x.html @@ -50,20 +50,20 @@ // Get the current hostname (probably an IP) link to my other ports above. let hostname = window.location.hostname; - let api_a = document.getElementById('map_link'); + let media_a = document.getElementById('media_link'); + if (media_a) { + let media_url = `http://${hostname}:8080/media`; + media_a.setAttribute('href', media_url); + media_a.textContent = `by navigating to ${media_url}`; + } + + let api_a = document.getElementById('api_link'); if (api_a) { let api_url = `http://${hostname}:8081`; api_a.setAttribute('href', api_url); api_a.textContent = `by navigating to ${api_url}`; } - let media_a = document.getElementById('media_link'); - if (media_a) { - let media_url = `http://${hostname}/media`; - media_a.setAttribute('href', media_url); - media_a.textContent = `by navigating to ${media_url}`; - } - let map_a = document.getElementById('map_link'); if (map_a) { let map_url = `http://${hostname}:8084`; @@ -71,7 +71,7 @@ map_a.textContent = `by navigating to ${map_url}`; } - let kiwix_a = document.getElementById('map_link'); + let kiwix_a = document.getElementById('kiwix_link'); if (kiwix_a) { let kiwix_url = `http://${hostname}:8085`; kiwix_a.setAttribute('href', kiwix_url); diff --git a/docker-compose.yml b/docker-compose.yml index 7736040f..bea9d79e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -86,6 +86,7 @@ services: - ${WEB_HOST-0.0.0.0}:${WEB_PORT-8080}:80 volumes: - './nginx.dev.conf:/etc/nginx/nginx.conf' + - './50x.html:/var/www/50x.html' - './icon.ico:/etc/nginx/favicon.ico' - './icon.png:/etc/nginx/icon.png' - './test:/opt/media' diff --git a/nginx.conf b/nginx.conf index bdcf2046..919ae93b 100644 --- a/nginx.conf +++ b/nginx.conf @@ -40,6 +40,10 @@ http { alias /opt/wrolpi/icon.png; } + location /50x.html { + alias /error/50x.html; + } + location /epub/epub.html { alias /opt/wrolpi/app/public/epub/epub.html; } diff --git a/nginx.dev.conf b/nginx.dev.conf index 48e4be09..aca16c16 100644 --- a/nginx.dev.conf +++ b/nginx.dev.conf @@ -30,6 +30,10 @@ http { alias /etc/nginx/icon.png; } + location /50x.html { + alias /var/www/50x.html; + } + location / { # React APP proxy_pass http://app:3000;