From 8819cd9ad220fbc8b46d5ee96401d8a488d94957 Mon Sep 17 00:00:00 2001 From: ksurl Date: Wed, 6 Apr 2022 19:27:42 -0700 Subject: [PATCH 1/4] add netbox subdomain --- netbox.subdomain.conf.sample | 41 ++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 netbox.subdomain.conf.sample diff --git a/netbox.subdomain.conf.sample b/netbox.subdomain.conf.sample new file mode 100644 index 0000000..951b995 --- /dev/null +++ b/netbox.subdomain.conf.sample @@ -0,0 +1,41 @@ +## Version 2021/05/18 +# make sure that your dns has a cname set for netbox and that your netbox container is not using a base url + +server { + listen 443 ssl; + listen [::]:443 ssl; + + server_name netbox.*; + + include /config/nginx/ssl.conf; + + client_max_body_size 0; + + # enable for ldap auth, fill in ldap details in ldap.conf + #include /config/nginx/ldap.conf; + + # enable for Authelia + #include /config/nginx/authelia-server.conf; + + location / { + # enable the next two lines for http auth + #auth_basic "Restricted"; + #auth_basic_user_file /config/nginx/.htpasswd; + + # enable the next two lines for ldap auth + #auth_request /auth; + #error_page 401 =200 /ldaplogin; + + # enable for Authelia + #include /config/nginx/authelia-location.conf; + + include /config/nginx/proxy.conf; + include /config/nginx/resolver.conf; + set $upstream_app netbox; + set $upstream_port 8000; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + + } + +} From 01821a4255d40c6b507fc8a620b091855bd787b7 Mon Sep 17 00:00:00 2001 From: ksurl Date: Mon, 23 Jan 2023 15:39:49 -0800 Subject: [PATCH 2/4] add comment about ALLOWED_HOST --- netbox.subdomain.conf.sample | 2 ++ 1 file changed, 2 insertions(+) diff --git a/netbox.subdomain.conf.sample b/netbox.subdomain.conf.sample index 951b995..5c41ac6 100644 --- a/netbox.subdomain.conf.sample +++ b/netbox.subdomain.conf.sample @@ -1,5 +1,7 @@ ## Version 2021/05/18 # make sure that your dns has a cname set for netbox and that your netbox container is not using a base url +# make sure your netbox instance is using ALLOWED_HOST=netbox.domain.com (replace with your own domain) +# or edit both the environment variable and this conf file if using a different subdomain server { listen 443 ssl; From 52f1b6bba46f7130ee8ab74c41e2f2a4c2e91502 Mon Sep 17 00:00:00 2001 From: ksurl Date: Sat, 18 Feb 2023 01:11:35 +0000 Subject: [PATCH 3/4] update netbox for authentik, ldap --- netbox.subdomain.conf.sample | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/netbox.subdomain.conf.sample b/netbox.subdomain.conf.sample index 5c41ac6..d1a02d8 100644 --- a/netbox.subdomain.conf.sample +++ b/netbox.subdomain.conf.sample @@ -1,5 +1,6 @@ -## Version 2021/05/18 -# make sure that your dns has a cname set for netbox and that your netbox container is not using a base url +## Version 2023/02/05 +# make sure that your container is named netbox +# make sure that your dns has a cname set for netbox # make sure your netbox instance is using ALLOWED_HOST=netbox.domain.com (replace with your own domain) # or edit both the environment variable and this conf file if using a different subdomain @@ -14,23 +15,28 @@ server { client_max_body_size 0; # enable for ldap auth, fill in ldap details in ldap.conf - #include /config/nginx/ldap.conf; + #include /config/nginx/ldap-server.conf; # enable for Authelia #include /config/nginx/authelia-server.conf; + # enable for Authentik (requires authentik-location.conf in the location block) + #include /config/nginx/authentik-server.conf; + location / { # enable the next two lines for http auth #auth_basic "Restricted"; #auth_basic_user_file /config/nginx/.htpasswd; - # enable the next two lines for ldap auth - #auth_request /auth; - #error_page 401 =200 /ldaplogin; + # enable for ldap auth (requires ldap-server.conf in the server block) + #include /config/nginx/ldap-location.conf; - # enable for Authelia + # enable for Authelia (requires authelia-server.conf in the server block) #include /config/nginx/authelia-location.conf; + # enable for Authentik (requires authentik-server.conf in the server block) + #include /config/nginx/authentik-location.conf; + include /config/nginx/proxy.conf; include /config/nginx/resolver.conf; set $upstream_app netbox; From 1934054bda3c9a71ab85714d0bf5f3d6010b3ecd Mon Sep 17 00:00:00 2001 From: Eric Nemchik Date: Fri, 17 Feb 2023 19:15:23 -0600 Subject: [PATCH 4/4] Update netbox.subdomain.conf.sample --- netbox.subdomain.conf.sample | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/netbox.subdomain.conf.sample b/netbox.subdomain.conf.sample index d1a02d8..89e8148 100644 --- a/netbox.subdomain.conf.sample +++ b/netbox.subdomain.conf.sample @@ -1,4 +1,4 @@ -## Version 2023/02/05 +## Version 2023/02/17 # make sure that your container is named netbox # make sure that your dns has a cname set for netbox # make sure your netbox instance is using ALLOWED_HOST=netbox.domain.com (replace with your own domain) @@ -14,10 +14,10 @@ server { client_max_body_size 0; - # enable for ldap auth, fill in ldap details in ldap.conf + # enable for ldap auth (requires ldap-location.conf in the location block) #include /config/nginx/ldap-server.conf; - # enable for Authelia + # enable for Authelia (requires authelia-location.conf in the location block) #include /config/nginx/authelia-server.conf; # enable for Authentik (requires authentik-location.conf in the location block)