Skip to content

Commit 78899fe

Browse files
authored
Merge pull request #438 from ksurl/netbox
add netbox subdomain
2 parents 41f69e5 + 1934054 commit 78899fe

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

netbox.subdomain.conf.sample

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
## Version 2023/02/17
2+
# make sure that your container is named netbox
3+
# make sure that your dns has a cname set for netbox
4+
# make sure your netbox instance is using ALLOWED_HOST=netbox.domain.com (replace with your own domain)
5+
# or edit both the environment variable and this conf file if using a different subdomain
6+
7+
server {
8+
listen 443 ssl;
9+
listen [::]:443 ssl;
10+
11+
server_name netbox.*;
12+
13+
include /config/nginx/ssl.conf;
14+
15+
client_max_body_size 0;
16+
17+
# enable for ldap auth (requires ldap-location.conf in the location block)
18+
#include /config/nginx/ldap-server.conf;
19+
20+
# enable for Authelia (requires authelia-location.conf in the location block)
21+
#include /config/nginx/authelia-server.conf;
22+
23+
# enable for Authentik (requires authentik-location.conf in the location block)
24+
#include /config/nginx/authentik-server.conf;
25+
26+
location / {
27+
# enable the next two lines for http auth
28+
#auth_basic "Restricted";
29+
#auth_basic_user_file /config/nginx/.htpasswd;
30+
31+
# enable for ldap auth (requires ldap-server.conf in the server block)
32+
#include /config/nginx/ldap-location.conf;
33+
34+
# enable for Authelia (requires authelia-server.conf in the server block)
35+
#include /config/nginx/authelia-location.conf;
36+
37+
# enable for Authentik (requires authentik-server.conf in the server block)
38+
#include /config/nginx/authentik-location.conf;
39+
40+
include /config/nginx/proxy.conf;
41+
include /config/nginx/resolver.conf;
42+
set $upstream_app netbox;
43+
set $upstream_port 8000;
44+
set $upstream_proto http;
45+
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
46+
47+
}
48+
49+
}

0 commit comments

Comments
 (0)