# Kegbot nginx.conf
# Automatically generated by setup-kegbot.py

upstream kegbot {
  server 127.0.0.1:8000;
}

server {
  listen 80;
  tcp_nopush on;
  tcp_nodelay on;

  gzip on;
  gzip_disable "msie6";
  gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
  gzip_vary on;

  keepalive_timeout 0;
  client_max_body_size 10m;

  location / {
    proxy_redirect      off;
    proxy_set_header    Host                    $host:$server_port;
    proxy_set_header    X-Real-IP               $remote_addr;
    proxy_set_header    X-Forwarded-For         $proxy_add_x_forwarded_for;
    proxy_set_header    X-Forwarded-Protocol    $scheme;
    proxy_pass          http://kegbot;
  }

  location /media/ {
    alias           ${media_dir};
    access_log      off;
    log_not_found   off;
    expires         7d;
    add_header      pragma public;
    add_header      cache-control "public";
  }

  location /static/ {
    alias           ${static_dir};
    access_log      off;
    log_not_found   off;
    expires         7d;
    add_header      pragma public;
    add_header      cache-control "public";
  }

  location /robots.txt {
    root            ${static_dir};
    access_log      off;
    log_not_found   off;
  }

  location /favicon.ico {
    root            ${static_dir};
    access_log      off;
    log_not_found   off;
  }

}


