|
| 1 | +## Version 2020/05/23 - Changelog: https://github.com/linuxserver/docker-letsencrypt/commits/master/root/defaults/authelia-server.conf |
| 2 | +# Make sure that your authelia container is in the same user defined bridge network and is named authelia |
| 3 | + |
| 4 | +location /authelia { |
| 5 | + include /config/nginx/proxy.conf; |
| 6 | + resolver 127.0.0.11 valid=30s; |
| 7 | + set $upstream_authelia authelia; |
| 8 | + proxy_pass http://$upstream_authelia:9091; |
| 9 | +} |
| 10 | + |
| 11 | +location /authelia/api/verify { |
| 12 | + internal; |
| 13 | + resolver 127.0.0.11 valid=30s; |
| 14 | + set $upstream_authelia authelia; |
| 15 | + proxy_pass_request_body off; |
| 16 | + proxy_pass http://$upstream_authelia:9091; |
| 17 | + proxy_set_header Content-Length ""; |
| 18 | + |
| 19 | + # Timeout if the real server is dead |
| 20 | + proxy_next_upstream error timeout invalid_header http_500 http_502 http_503; |
| 21 | + |
| 22 | + # [REQUIRED] Needed by Authelia to check authorizations of the resource. |
| 23 | + # Provide either X-Original-URL and X-Forwarded-Proto or |
| 24 | + # X-Forwarded-Proto, X-Forwarded-Host and X-Forwarded-Uri or both. |
| 25 | + # Those headers will be used by Authelia to deduce the target url of the user. |
| 26 | + # Basic Proxy Config |
| 27 | + client_body_buffer_size 128k; |
| 28 | + proxy_set_header Host $host; |
| 29 | + proxy_set_header X-Original-URL $scheme://$http_host$request_uri; |
| 30 | + proxy_set_header X-Real-IP $remote_addr; |
| 31 | + proxy_set_header X-Forwarded-For $remote_addr; |
| 32 | + proxy_set_header X-Forwarded-Proto $scheme; |
| 33 | + proxy_set_header X-Forwarded-Host $http_host; |
| 34 | + proxy_set_header X-Forwarded-Uri $request_uri; |
| 35 | + proxy_set_header X-Forwarded-Ssl on; |
| 36 | + proxy_redirect http:// $scheme://; |
| 37 | + proxy_http_version 1.1; |
| 38 | + proxy_set_header Connection ""; |
| 39 | + proxy_cache_bypass $cookie_session; |
| 40 | + proxy_no_cache $cookie_session; |
| 41 | + proxy_buffers 4 32k; |
| 42 | + |
| 43 | + # Advanced Proxy Config |
| 44 | + send_timeout 5m; |
| 45 | + proxy_read_timeout 240; |
| 46 | + proxy_send_timeout 240; |
| 47 | + proxy_connect_timeout 240; |
| 48 | +} |
0 commit comments