mirror of
				https://github.com/blakeblackshear/frigate.git
				synced 2025-10-27 10:52:11 +01:00 
			
		
		
		
	adding instructions for Nginix reverse proxy (#6159)
* adding instructions for Nginix reverse proxy adding an example of subdomain reverse proxy for nginx * Update docs/docs/guides/reverse_proxy.md Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com> * Update docs/docs/guides/reverse_proxy.md Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com> * add some descriptions for steps add more information on each of the reverse proxy sections. * cleanup --------- Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com> Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
This commit is contained in:
		
							parent
							
								
									7960090409
								
							
						
					
					
						commit
						ba6794fb99
					
				@ -84,3 +84,61 @@ There are many ways to authenticate a website but a straightforward approach is
 | 
				
			|||||||
    </Location>
 | 
					    </Location>
 | 
				
			||||||
</VirtualHost>
 | 
					</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;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user