mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-22 20:51:07 +01:00
Activated some proxy caching
This commit is contained in:
parent
0e1f6dbf28
commit
971b9fc90d
@ -12,4 +12,15 @@ location /
|
||||
proxy_send_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
send_timeout 300;
|
||||
location ~* \.(html|css|jpg|gif|ico|js)$ {
|
||||
proxy_cache cache;
|
||||
proxy_cache_key $host$uri$is_args$args;
|
||||
proxy_cache_valid 200 301 302 30m;
|
||||
expires 30m;
|
||||
{% if https_port is defined %}
|
||||
proxy_pass https://127.0.0.1:{{https_port}};
|
||||
{% else %}
|
||||
proxy_pass http://127.0.0.1:{{http_port}};
|
||||
{% endif %}
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ events
|
||||
|
||||
http
|
||||
{
|
||||
proxy_cache_path /tmp/cache levels=1:2 keys_zone=cache:60m max_size=1G;
|
||||
include mime.types;
|
||||
default_type text/html;
|
||||
access_log /dev/null;
|
||||
|
Loading…
Reference in New Issue
Block a user