-
Notifications
You must be signed in to change notification settings - Fork 23
/
nginx.conf
35 lines (28 loc) · 876 Bytes
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
map $http_x_forwarded_proto $thescheme {
default $scheme;
https https;
}
server {
listen 80 default_server;
server_name localhost;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
ssl_certificate /etc/ssl/server.crt;
ssl_certificate_key /etc/ssl/server.key;
client_max_body_size 25m;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $thescheme;
add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"';
location / {
proxy_pass http://netbox:8000;
}
location /login/ {
proxy_pass http://netbox:8000/api/plugins/sso/login/;
}
location /sso/ {
proxy_pass http://netbox:8000/api/plugins/sso/; # Must have a trailing slash to strip the original path
}
}