diff options
| author | 2024-05-27 04:32:59 +0100 | |
|---|---|---|
| committer | 2024-05-27 04:36:04 +0100 | |
| commit | fc36abfa4cb324d383ccf877d3fd7012eb0c1fea (patch) | |
| tree | 420694d8e0c112ae4dbc84c32b06e199522525dc /ansible/roles | |
| parent | Add new alias for file server (diff) | |
Add 404 fallback for files server
Previously the files server would return a HTTP 500 if a matching file
was not found, since internally NGINX would fall into a redirect loop
trying to locate the relevant file.
This adds a final 404 fallback handler so if there is not a direct match
we return an error instead of returning a HTTP 500.
Diffstat (limited to 'ansible/roles')
| -rw-r--r-- | ansible/roles/nginx/files/files.pydis.wtf | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/ansible/roles/nginx/files/files.pydis.wtf b/ansible/roles/nginx/files/files.pydis.wtf index eb1ba45..9d4cf68 100644 --- a/ansible/roles/nginx/files/files.pydis.wtf +++ b/ansible/roles/nginx/files/files.pydis.wtf @@ -5,6 +5,6 @@ server {    root        /var/www/turing;    location / { -    try_files $uri $uri/; +    try_files $uri $uri/ =404;    }  } | 
