mirror of
https://github.com/ArchipelagoMW/Archipelago.git
synced 2026-03-24 13:23:21 -07:00
Docs: Don't serve non-static files in example_nginx.conf (#5971)
* Docs: Don't serve non-static files in example_nginx.conf `try_files` will serve the file as long as it exists, which means I could `GET /autolauncher.py` and be served the file. * Use root instead of alias, add route for favicon * Update deploy/example_nginx.conf
This commit is contained in:
@@ -41,16 +41,8 @@ http {
|
||||
# server_name example.com www.example.com;
|
||||
|
||||
keepalive_timeout 5;
|
||||
|
||||
# path for static files
|
||||
root /app/WebHostLib;
|
||||
|
||||
|
||||
location / {
|
||||
# checks for static file, if not found proxy to app
|
||||
try_files $uri @proxy_to_app;
|
||||
}
|
||||
|
||||
location @proxy_to_app {
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Host $http_host;
|
||||
@@ -60,5 +52,14 @@ http {
|
||||
|
||||
proxy_pass http://app_server;
|
||||
}
|
||||
|
||||
location /static/ {
|
||||
root /app/WebHostLib/;
|
||||
autoindex off;
|
||||
}
|
||||
|
||||
location = /favicon.ico {
|
||||
alias /app/WebHostLib/static/static/favicon.ico;
|
||||
access_log off;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user