Fakultas Ilmu Komputer UI

Skip to content
Snippets Groups Projects
Commit c348b0c4 authored by Annisa Devi Nurmalasari's avatar Annisa Devi Nurmalasari
Browse files

Update proxy

parent c20bde2c
Branches
No related tags found
No related merge requests found
proxy_cache_path /tmp/cache keys_zone=mycache:10m levels=1:2 inactive=30m
max_size=100m;
server { server {
listen 52894; listen 52894;
listen [::]:52894; listen [::]:52894;
...@@ -9,4 +12,13 @@ server { ...@@ -9,4 +12,13 @@ server {
location ~ /read/([0-9]*) { location ~ /read/([0-9]*) {
proxy_pass http://0.0.0.0:32894/read/$1; proxy_pass http://0.0.0.0:32894/read/$1;
} }
location ~ /read/([0-9]*)/([0-9]*) {
proxy_cache mycache;
proxy_cache_valid 30m;
proxy_cache_key "$1$2";
add_header X-Proxy-Cache $upstream_cache_status;
proxy_pass http://0.0.0.0:32894/read/$1;
}
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment