roflcoopter / viseron

Self-hosted, local only NVR and AI Computer Vision software. With features such as object detection, motion detection, face recognition and more, it gives you the power to keep an eye on your home, office or any other place you want to monitor.
MIT License
1.66k stars 171 forks source link

Nginx configuration reverse proxy #666

Closed hansyulian closed 1 year ago

hansyulian commented 1 year ago

Hi, i would like to ask is there anyone able to provide me a reverse proxy config for nginx? I tried several config but it seems that the web socket always reset.

roflcoopter commented 1 year ago

I am using a very basic nginx config which is working fine. I am running the linuxserver/swag docker container, so the include files are the default settings from the container.

server {
    listen 443 ssl;

    server_name viseron.*;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;

    location / {
        include /config/nginx/proxy.conf;
        include /config/nginx/resolver.conf;
        set $upstream_app viseron;
        set $upstream_port 8888;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;

    }
}