mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-12 18:14:28 +05:00
77 lines
2.2 KiB
INI
77 lines
2.2 KiB
INI
# /etc/nginx/sites-available/fluidd
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
|
|
access_log /var/log/nginx/fluidd-access.log;
|
|
error_log /var/log/nginx/fluidd-error.log;
|
|
|
|
#web_path from fluidd static files
|
|
root /home/pi/fluidd;
|
|
|
|
index index.html;
|
|
server_name _;
|
|
|
|
#max upload size for gcodes
|
|
client_max_body_size 200M;
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
location /printer {
|
|
proxy_pass http://apiserver/printer;
|
|
proxy_set_header Host $http_host;
|
|
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;
|
|
}
|
|
|
|
location /api {
|
|
proxy_pass http://apiserver/api;
|
|
proxy_set_header Host $http_host;
|
|
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;
|
|
}
|
|
|
|
location /access {
|
|
proxy_pass http://apiserver/access;
|
|
proxy_set_header Host $http_host;
|
|
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;
|
|
}
|
|
|
|
location /websocket {
|
|
proxy_pass http://apiserver/websocket;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_read_timeout 86400;
|
|
}
|
|
|
|
location /machine {
|
|
proxy_pass http://apiserver/machine;
|
|
proxy_set_header Host $http_host;
|
|
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;
|
|
}
|
|
|
|
location /server {
|
|
proxy_pass http://apiserver/server;
|
|
proxy_set_header Host $http_host;
|
|
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;
|
|
}
|
|
|
|
location /webcam/ {
|
|
proxy_pass http://mjpgstreamer/;
|
|
}
|
|
} |