-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnginx.conf
37 lines (26 loc) · 865 Bytes
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
worker_processes 1;
events {
worker_connections 1024;
}
error_log /dev/stdout debug;
http {
proxy_cache_path /data/nginx/cache levels=1:2 keys_zone=one:10m;
log_format cache_status '[$time_local] "$request" $upstream_cache_status';
access_log /dev/stdout cache_status;
server {
listen 8080;
server_name access.alchemyapi.com, api.embed.ly;
resolver 8.8.8.8;
location / {
proxy_cache one;
proxy_cache_methods GET HEAD POST;
proxy_cache_valid 10080m;
proxy_ignore_headers "Cache-Control";
proxy_cache_key $request_uri$request_body;
proxy_buffers 8 32k;
proxy_buffer_size 64k;
proxy_pass http://$http_host$uri$is_args$args;
add_header X-Cached $upstream_cache_status;
}
}
}