script: update nginx configurations

This commit is contained in:
th33xitus
2021-07-10 09:22:43 +02:00
parent d3726733e5
commit 4d7e10e5c3
3 changed files with 33 additions and 6 deletions

View File

@@ -2,6 +2,9 @@
This document covers possible important changes to KIAUH.
### 2021-07-10
* The NGINX configuration files got updated to be in sync with MainsailOS and FluiddPi. Issues with the NGINX service not starting up due to wrong configuration should be resolved now. To get the updated configuration files, please remove Moonraker and Mainsail / Fluidd with KIAUH first and then re-install it. An automated file check for those configuration files might follow in the future which then automates updating those files if there were important changes.
### 2021-06-29
* KIAUH will now patch the new `log_path` to existing moonraker.conf files when updating Moonraker and the entry is missing. Before that, it was necessary that the user provided that path manually to make Fluidd display the logfiles in its interface. This issue should be resolved now.

View File

@@ -14,7 +14,7 @@ server {
gzip_comp_level 4;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/json application/xml;
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/json application/xml application/javascript;
# web_path from <<UI>> static files
root /home/pi/<<UI>>;
@@ -56,6 +56,18 @@ server {
}
location /webcam/ {
proxy_pass http://mjpgstreamer/;
proxy_pass http://mjpgstreamer1/;
}
location /webcam2/ {
proxy_pass http://mjpgstreamer2/;
}
location /webcam3/ {
proxy_pass http://mjpgstreamer3/;
}
location /webcam4/ {
proxy_pass http://mjpgstreamer4/;
}
}

View File

@@ -1,13 +1,25 @@
# /etc/nginx/conf.d/upstreams.conf
upstream apiserver {
#edit your api port here
ip_hash;
server 127.0.0.1:7125;
}
upstream mjpgstreamer {
#edit your webcam port here
upstream mjpgstreamer1 {
ip_hash;
server 127.0.0.1:8080;
}
upstream mjpgstreamer2 {
ip_hash;
server 127.0.0.1:8081;
}
upstream mjpgstreamer3 {
ip_hash;
server 127.0.0.1:8082;
}
upstream mjpgstreamer4 {
ip_hash;
server 127.0.0.1:8083;
}