diff options
-rw-r--r-- | kvmd/configs/nginx/nginx.conf.example | 3 | ||||
-rw-r--r-- | os/platforms/v1/Dockerfile.part | 3 | ||||
-rw-r--r-- | os/platforms/v1/motd | 17 |
3 files changed, 23 insertions, 0 deletions
diff --git a/kvmd/configs/nginx/nginx.conf.example b/kvmd/configs/nginx/nginx.conf.example index f88e9726..e8d2f0a1 100644 --- a/kvmd/configs/nginx/nginx.conf.example +++ b/kvmd/configs/nginx/nginx.conf.example @@ -50,6 +50,9 @@ http { #PROD add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; +#PROD auth_basic "Restricted Area"; +#PROD auth_basic_user_file /etc/nginx/htpasswd; + location / { root /usr/share/kvmd/web; index index.html; diff --git a/os/platforms/v1/Dockerfile.part b/os/platforms/v1/Dockerfile.part index 73fb762e..0e9443a3 100644 --- a/os/platforms/v1/Dockerfile.part +++ b/os/platforms/v1/Dockerfile.part @@ -1,5 +1,6 @@ RUN pkg-install \ nginx \ + apache-tools \ mjpg-streamer-pikvm \ python \ python-raspberry-gpio @@ -14,12 +15,14 @@ RUN systemctl enable kvmd COPY stages/pikvm/config.txt /boot/ COPY stages/pikvm/sysctl.conf /etc/sysctl.d/99-pikvm.conf COPY stages/pikvm/udev.rules /etc/udev/rules.d/pikvm.rules +COPY stages/pikvm/motd /etc/ RUN sed -i -e "s/console=ttyAMA0\,115200//g" /boot/cmdline.txt \ && sed -i -e "s/kgdboc=ttyAMA0\,115200//g" /boot/cmdline.txt RUN systemctl mask [email protected] RUN sed -e "s/^#PROD//g" /usr/share/kvmd/configs/nginx/nginx.conf.example > /etc/nginx/nginx.conf +RUN echo "admin:admin" > /etc/nginx/htpasswd RUN cp /usr/share/kvmd/configs/kvmd/v1.yaml /etc/kvmd.yaml ARG NEW_HTTPS_CERT diff --git a/os/platforms/v1/motd b/os/platforms/v1/motd new file mode 100644 index 00000000..5b157c58 --- /dev/null +++ b/os/platforms/v1/motd @@ -0,0 +1,17 @@ + _____ _ _ ____ ____ __ + | __ (_) | |/ /\ \ / / \/ | + | |__) | __ | ' / \ \ / /| \ / | + | ___/ | (__) | < \ \/ / | |\/| | + | | | | | . \ \ / | | | | + |_| |_| |_|\_\ \/ |_| |_| + + Welcome to Pi-KVM - Open Source IP-KVM based on Raspberry Pi + + Website: https://github.com/pi-kvm + ____________________________________________________________________________ + + The root filesystem of Pi-KVM is mounted in read-only mode by default. + Use command "rw" to remount it in the RW-mode and "ro" to switch it back. + + To change Web UI password use command "htpasswd /etc/nginx/htpasswd admin". + |