Skip to content

NVR with realtime local object detection for IP cameras

adding instructions for Nginix reverse proxy (#6159)

vajonamba6794fb99a8
diff --git a/docs/docs/guides/reverse_proxy.md b/docs/docs/guides/reverse_proxy.md
index 2e284eedeb..165b4d5173 100644
--- a/docs/docs/guides/reverse_proxy.md
+++ b/docs/docs/guides/reverse_proxy.md
@@ -84,3 +84,61 @@ There are many ways to authenticate a website but a straightforward approach is
</Location>
</VirtualHost>
```
+
+## Nginx Reverse Proxy
+
+This method shows a working example for subdomain type reverse proxy with SSL enabled.
+
+### Setup server and port to reverse proxy
+
+This is set in `$server` and `$port` this should match your ports you have exposed to your docker container. Optionally you listen on port `443` and enable `SSL`
+
+```
+# ------------------------------------------------------------
+# frigate.domain.com
+# ------------------------------------------------------------
+
+server {
+ set $forward_scheme http;
+ set $server "192.168.100.2"; # FRIGATE SERVER LOCATION
+ set $port 5000;
+
+ listen 80;
+ listen 443 ssl http2;
+
+ server_name frigate.domain.com;
+}
+```
+
+### Setup SSL (optional)
+
+This section points to your SSL files, the example below shows locations to a default Lets Encrypt SSL certificate.
+
+```
+ # Let's Encrypt SSL
+ include conf.d/include/letsencrypt-acme-challenge.conf;
+ include conf.d/include/ssl-ciphers.conf;
+ ssl_certificate /etc/letsencrypt/live/npm-1/fullchain.pem;
+ ssl_certificate_key /etc/letsencrypt/live/npm-1/privkey.pem;
+```
+
+
+### Setup reverse proxy settings
+
+Thhe settings below enabled connection upgrade, sets up logging (optional) and proxies everything from the `/` context to the docker host and port specified earlier in the configuration
+
+```
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection $http_connection;
+ proxy_http_version 1.1;
+
+ access_log /data/logs/proxy-host-40_access.log proxy;
+ error_log /data/logs/proxy-host-40_error.log warn;
+
+ location / {
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection $http_connection;
+ proxy_http_version 1.1;
+ }
+
+```