mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-22 07:56:18 -05:00
Fixing 50x.html links. Displaying 50x.html when requested directly.
This commit is contained in:
parent
7f67d4c07e
commit
b3068885b2
4 changed files with 18 additions and 9 deletions
18
50x.html
18
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);
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue