gpt2-chitchat / nginx /chat_bot.conf
mason0510's picture
Duplicate from xibaozi/gpt2-chitchat
bd5d31b
upstream webapp {
server chatbot_api:5005;
}
proxy_cache_path /etc/nginx/conf.d/cache levels=1:2 keys_zone=cache_one:512m inactive=10m max_size=64m;
server {
listen 5000;
server_name localhost;
location / {
proxy_pass http://webapp;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
add_header X-Cache $upstream_cache_status;
#Set Nginx Cache
proxy_ignore_headers Set-Cookie Cache-Control expires;
proxy_cache cache_one;
proxy_cache_key $host$uri$is_args$args;
proxy_cache_valid 200 304 301 302 1m;
expires 12h;
}
}