Please help me configure my Nginx server properly, I want to simply proxy pass the HADashboard to another local port and path.
This works for the main screen
http://192.168.0.190:3333/test/
but this give me a java console error with this in the log
http://192.168.0.190:3333/test/hello
2019/10/12 10:35:25 [error] 26162#26162: *62 open() “/usr/share/nginx/html/stream” failed (2: No such file or directory), client: 192.168.2.152, server: , request: “GET /stream HTTP/1.1”, host: “192.168.0.190:3333”
2019/10/12 10:36:03 [error] 26162#26162: *63 open() “/usr/share/nginx/html/state/default/switch.front_door” failed (2: No such file or directory), client: 192.168.2.152, server: , request: “GET /state/default/switch.front_door HTTP/1.1”, host: “192.168.0.190:3333”, referrer: “http://192.168.0.190:3333/test/Hello”
Everything works from the HADashboard url
My nginx is
worker_processes 2;
events {
worker_connections 1024;
}
http {
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
access_log /dev/stdout;
error_log /dev/stdout;
}
server {
listen 192.168.0.190:3333;
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
proxy_buffering off;
location /test {
rewrite /test/(.*) /$1 break;
proxy_pass http://192.168.0.190:2222/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
}
}