From 38de2f9b40fe743f9d40bbfbb24005af35db9a22 Mon Sep 17 00:00:00 2001 From: Roland Date: Wed, 12 Jun 2024 18:44:59 -0600 Subject: [PATCH] Moving HTTP kiwix/help services to 9085/9086 ports. Nginx will serve HTTPS proxy for kiwix/help services at the old ports. Modifying apache2 to use HTTPS to serve map. Using new https_proxy docker container to serve HTTPS for zim, map and help. --- README.md | 6 +- app/src/App.js | 3 +- app/src/components/Apps.js | 2 +- app/src/components/Common.js | 7 +- app/src/components/Map.js | 8 +- app/src/components/Zim.js | 9 +- docker-compose.yml | 57 +++++++-- docker/help/Dockerfile | 2 +- docker/help/nginx.help.conf | 18 +++ docker/https_proxy/Dockerfile | 12 ++ docker/https_proxy/nginx.proxy.conf | 18 +++ docker/map/nginx.map.conf | 18 +++ docker/web/Dockerfile | 11 ++ docker/web/nginx.dev.conf | 44 +++++++ docker/web/wrolpi.dev.conf | 73 ++++++++++++ docker/zim/entrypoint.sh | 2 +- docker/zim/nginx.zim.conf | 18 +++ etc/raspberrypios/000-default.conf | 4 + etc/raspberrypios/nginx.conf | 123 +++++++------------- etc/raspberrypios/ports.conf | 16 +-- etc/raspberrypios/wrolpi-api.service | 2 +- etc/raspberrypios/wrolpi-help-files.desktop | 6 + etc/raspberrypios/wrolpi-help.desktop | 6 + etc/raspberrypios/wrolpi-help.service | 2 +- etc/raspberrypios/wrolpi.conf | 73 ++++++++++++ etc/raspberrypios/wrolpi.desktop | 6 + help.sh | 12 +- nginx.dev.conf | 90 -------------- pi-gen/stage2/04-wrolpi/04-run-chroot.sh | 27 +---- repair.sh | 15 +++ scripts/start_kiwix_serve.sh | 4 +- 31 files changed, 450 insertions(+), 244 deletions(-) create mode 100644 docker/help/nginx.help.conf create mode 100644 docker/https_proxy/Dockerfile create mode 100644 docker/https_proxy/nginx.proxy.conf create mode 100644 docker/map/nginx.map.conf create mode 100644 docker/web/Dockerfile create mode 100644 docker/web/nginx.dev.conf create mode 100644 docker/web/wrolpi.dev.conf create mode 100644 docker/zim/nginx.zim.conf create mode 100644 etc/raspberrypios/wrolpi-help-files.desktop create mode 100644 etc/raspberrypios/wrolpi-help.desktop create mode 100644 etc/raspberrypios/wrolpi.conf create mode 100644 etc/raspberrypios/wrolpi.desktop delete mode 100644 nginx.dev.conf diff --git a/README.md b/README.md index 9c0e260b..6e62cfd9 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ You can try out WROLPi by running the docker containers. 8. Start the docker containers. * `docker-compose up` 9. Browse to WROLPi. - * http://0.0.0.0:8080 + * https://0.0.0.0:8443 # Debian 12 Install @@ -106,7 +106,7 @@ Steps necessary to initialize your WROLPi after installing the Debian image from 5. Switch to the root user: `su -` 6. Initialize the WROLPi databases using the repair script: `/opt/wrolpi/repair.sh` 7. Reboot: `reboot` -8. Browse to http://wrolpi.local or the IP address of your WROLPi! +8. Browse to https://wrolpi.local or the IP address of your WROLPi! # Raspberry Pi Install @@ -118,7 +118,7 @@ Steps necessary to initialize your WROLPi after installing the Raspberry Pi imag * `echo '/dev/sda1 /media/wrolpi auto defaults,nofail 0 0' | sudo tee -a /etc/fstab` 4. Initialize the WROLPi databases using the repair script: `sudo /opt/wrolpi/repair.sh` 5. Reboot `sudo reboot` -6. Join the Hotspot or browse to http://wrolpi.local or the IP address of your WROLPi! +6. Join the Hotspot or browse to https://wrolpi.local or the IP address of your WROLPi! # Charter diff --git a/app/src/App.js b/app/src/App.js index cd82db13..519023ba 100644 --- a/app/src/App.js +++ b/app/src/App.js @@ -21,6 +21,7 @@ import {SemanticToastContainer} from "react-semantic-toasts-2"; import {FilePreviewProvider} from "./components/FilePreview"; import {TagsProvider} from "./Tags"; import {ZimRoute} from "./components/Zim"; +import {HELP_VIEWER_URI} from "./components/Common"; function PageNotFound() { const {t} = useContext(ThemeContext); @@ -51,7 +52,7 @@ function Footer() { function HelpPage() { return