|
| 1 | +## Version 2025/07/18 |
| 2 | +# make sure that your pocketid container is named pocketid |
| 3 | +# make sure that your dns has a cname set for pocketid |
| 4 | + |
| 5 | +server { |
| 6 | + listen 443 ssl; |
| 7 | +# listen 443 quic; |
| 8 | + listen [::]:443 ssl; |
| 9 | +# listen [::]:443 quic; |
| 10 | + |
| 11 | + server_name pocketid.*; |
| 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 | + # enable for Tinyauth (requires tinyauth-location.conf in the location block) |
| 27 | + #include /config/nginx/tinyauth-server.conf; |
| 28 | + |
| 29 | + if ($lan-ip = yes) { set $geo-whitelist yes; } |
| 30 | + if ($geo-whitelist = no) { return 404; } |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + location / { |
| 35 | + # enable the next two lines for http auth |
| 36 | + #auth_basic "Restricted"; |
| 37 | + #auth_basic_user_file /config/nginx/.htpasswd; |
| 38 | + |
| 39 | + # enable for ldap auth (requires ldap-server.conf in the server block) |
| 40 | + #include /config/nginx/ldap-location.conf; |
| 41 | + |
| 42 | + # enable for Authelia (requires authelia-server.conf in the server block) |
| 43 | + #include /config/nginx/authelia-location.conf; |
| 44 | + |
| 45 | + # enable for Authentik (requires authentik-server.conf in the server block) |
| 46 | + #include /config/nginx/authentik-location.conf; |
| 47 | + |
| 48 | + # enable for Tinyauth (requires tinyauth-server.conf in the server block) |
| 49 | + #include /config/nginx/tinyauth-location.conf; |
| 50 | + |
| 51 | + include /config/nginx/proxy.conf; |
| 52 | + include /config/nginx/resolver.conf; |
| 53 | + set $upstream_app pocketid; |
| 54 | + set $upstream_port 1411; |
| 55 | + set $upstream_proto http; |
| 56 | + proxy_pass $upstream_proto://$upstream_app:$upstream_port; |
| 57 | + |
| 58 | +# proxy_set_header X-Forwarded-Host $http_host; |
| 59 | +# proxy_set_header X-Scheme $scheme; |
| 60 | + |
| 61 | +# proxy_buffer_size 256k; |
| 62 | +# proxy_buffers 4 512k; |
| 63 | +# proxy_busy_buffers_size 512k; |
| 64 | + |
| 65 | + |
| 66 | + } |
| 67 | +} |
0 commit comments