|
| 1 | +## Version 2024/02/13 |
| 2 | +# make sure that your triliumnext container is named triliumnext |
| 3 | +# make sure that your dns has a cname set for triliumnext |
| 4 | + |
| 5 | +server { |
| 6 | + listen 443 ssl; |
| 7 | + listen [::]:443 ssl; |
| 8 | + |
| 9 | + server_name triliumnext.*; |
| 10 | + |
| 11 | + include /config/nginx/ssl.conf; |
| 12 | + |
| 13 | + client_max_body_size 0; |
| 14 | + |
| 15 | + proxy_set_header Host $host; |
| 16 | + proxy_set_header X-Real-IP $remote_addr; |
| 17 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| 18 | + proxy_set_header X-Forwarded-Proto $scheme; |
| 19 | + proxy_set_header Upgrade $http_upgrade; |
| 20 | + proxy_set_header Connection "upgrade"; |
| 21 | + proxy_read_timeout 90; |
| 22 | + # enable for ldap auth (requires ldap-location.conf in the location block) |
| 23 | + #include /config/nginx/ldap-server.conf; |
| 24 | + |
| 25 | + # enable for Authelia (requires authelia-location.conf in the location block) |
| 26 | + #include /config/nginx/authelia-server.conf; |
| 27 | + |
| 28 | + # enable for Authentik (requires authentik-location.conf in the location block) |
| 29 | + #include /config/nginx/authentik-server.conf; |
| 30 | + |
| 31 | + location / { |
| 32 | + # enable the next two lines for http auth |
| 33 | + #auth_basic "Restricted"; |
| 34 | + #auth_basic_user_file /config/nginx/.htpasswd; |
| 35 | + |
| 36 | + # enable for ldap auth (requires ldap-server.conf in the server block) |
| 37 | + #include /config/nginx/ldap-location.conf; |
| 38 | + |
| 39 | + # enable for Authelia (requires authelia-server.conf in the server block) |
| 40 | + #include /config/nginx/authelia-location.conf; |
| 41 | + |
| 42 | + # enable for Authentik (requires authentik-server.conf in the server block) |
| 43 | + #include /config/nginx/authentik-location.conf; |
| 44 | + |
| 45 | + include /config/nginx/proxy.conf; |
| 46 | + include /config/nginx/resolver.conf; |
| 47 | + |
| 48 | + set $upstream_app triliumnext; |
| 49 | + set $upstream_port 8080; |
| 50 | + set $upstream_proto http; |
| 51 | + proxy_pass $upstream_proto://$upstream_app:$upstream_port; |
| 52 | + |
| 53 | + } |
| 54 | + |
| 55 | +} |
0 commit comments