Consolidate listen statements

This commit is contained in:
Nicolas Mowen 2024-06-27 09:05:14 -06:00
parent 79b5a2f9ea
commit 5107bcb277
3 changed files with 22 additions and 11 deletions

View File

@ -59,9 +59,6 @@ http {
include go2rtc_upstream.conf; include go2rtc_upstream.conf;
server { server {
# intended for internal traffic, not protected by auth
listen 5000;
include listen.conf; include listen.conf;
# vod settings # vod settings

View File

@ -5,6 +5,9 @@ listen 8971;
# intended for external traffic, protected by auth # intended for external traffic, protected by auth
listen 8971 ssl; listen 8971 ssl;
# intended for internal traffic, not protected by auth
listen 5000;
ssl_certificate /etc/letsencrypt/live/frigate/fullchain.pem; ssl_certificate /etc/letsencrypt/live/frigate/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/frigate/privkey.pem; ssl_certificate_key /etc/letsencrypt/live/frigate/privkey.pem;

View File

@ -118,25 +118,36 @@ services:
volumes: volumes:
... ...
- /path/to/your/nginx.conf:/usr/local/nginx/conf/nginx.conf - /path/to/your/nginx.conf:/usr/local/nginx/conf/nginx.conf
``` ```
### Enabling IPv6 ### Enabling IPv6
IPv6 is disabled by default, to enable IPv6 nginx.conf needs to be bind mounted as described above with the IPv6 enabled. For example: IPv6 is disabled by default, to enable IPv6 listen.gotmpl needs to be bind mounted with IPv6 enabled. For example:
``` ```
server { {{ if not .enabled }}
listen: 5000; # intended for external traffic, protected by auth
} listen 8971;
{{ else }}
# intended for external traffic, protected by auth
listen 8971 ssl;
# intended for internal traffic, not protected by auth
listen 5000;
``` ```
becomes becomes
``` ```
server { {{ if not .enabled }}
listen [::]:5000 ipv6only=off; # intended for external traffic, protected by auth
} listen [::]:8971 ipv6only=off;
{{ else }}
# intended for external traffic, protected by auth
listen [::]:8971 ipv6only=off ssl;
# intended for internal traffic, not protected by auth
listen [::]:5000 ipv6only=off;
``` ```
## Custom Dependencies ## Custom Dependencies