mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-12 18:14:28 +05:00
40 lines
932 B
INI
40 lines
932 B
INI
map $http_upgrade $connection_upgrade {
|
|
default upgrade;
|
|
'' close;
|
|
}
|
|
|
|
upstream octoprint {
|
|
server 127.0.0.1:5000;
|
|
}
|
|
|
|
upstream mjpg-streamer {
|
|
server 127.0.0.1:8080;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
#listen [::]:80;
|
|
|
|
location / {
|
|
proxy_pass http://octoprint/;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Scheme $scheme;
|
|
#proxy_set_header X-Script-Name /;
|
|
proxy_http_version 1.1;
|
|
client_max_body_size 0;
|
|
}
|
|
|
|
location /webcam {
|
|
proxy_pass http://mjpg-streamer/;
|
|
}
|
|
|
|
# redirect server error pages to the static page /50x.html
|
|
error_page 500 502 503 504 /50x.html;
|
|
location = /50x.html {
|
|
root html;
|
|
}
|
|
} |