-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cb4f07d
commit cfa35e6
Showing
2 changed files
with
27 additions
and
4 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
server { | ||
listen <%= ENV["PORT"] %>; | ||
server_name _; | ||
|
||
proxy_cache_path /tmp/nginx_assistant_cache levels=1:2 keys_zone=assistant:10m max_size=1g inactive=60m use_temp_path=off; | ||
|
||
location /static/ { | ||
expires max; | ||
alias /app/staticfiles/; | ||
} | ||
|
||
location / { | ||
proxy_pass http://unix:/tmp/gunicorn.sock; | ||
proxy_cache assistant; | ||
proxy_cache_key $request_method$request_uri; | ||
proxy_cache_lock on; | ||
proxy_cache_lock_timeout 10s; | ||
proxy_cache_use_stale error timeout updating; | ||
proxy_cache_background_update on; | ||
add_header X-Cache-Status $upstream_cache_status; | ||
} | ||
|
||
location ~ ^/(favicon(?:-\d+)?.(?:jpe?g|png|ico))$ { | ||
access_log off; | ||
log_not_found off; | ||
} | ||
} |