Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions workshop/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
proxy_cache_path /home/nakama/nginx_cache/static levels=1:2 keys_zone=static:1m max_size=10g inactive=1m

use_temp_path=off;

proxy_cache_key $request_method$host$request_uri;


upstream backend {
server localhost:9991 weight=2;
server localhost:9992 weight=1;
server localhost:9993 weight=2;
server localhost:9994 weight=2;
}

server {
listen 9999;

location /get {
proxy_cache static;
proxy_cache_revalidate on;
proxy_cache_min_uses 1;
proxy_cache_valid 200 10m;
proxy_cache_use_stale error timeout http_500 http_404;
proxy_cache_background_update on;
proxy_cache_lock on;


proxy_pass http://backend/get;
}
location /create {

proxy_pass http://backend/create;
}
}