cluster

Infrastructure files for Nordgedanken and Midnightthoughts.
git clone git://archive.git.mtrnord.blog/MTRNord/cluster.git
Log | Files | Refs | README

reverse_proxy.conf (1214B)


      1 include /etc/nginx/conf.d/server_config;
      2 
      3 upstream web {
      4     server localhost:8000;
      5 }
      6 upstream flower {
      7     server localhost:5555;
      8 }
      9 
     10 server {
     11     access_log /var/log/nginx/access.log cache_log;
     12 
     13     listen 8080;
     14     include /etc/nginx/conf.d/server_name;
     15 
     16     http2 on;
     17 
     18     sendfile on;
     19     tcp_nopush on;
     20     tcp_nodelay on;
     21     keepalive_timeout 65;
     22     types_hash_max_size 2048;
     23     #include /etc/nginx/mime.types;
     24     #default_type application/octet-stream;
     25 
     26     gzip on;
     27     gzip_disable "msie6";
     28 
     29     proxy_read_timeout 1800s;
     30     chunked_transfer_encoding on;
     31 
     32     # store responses to anonymous users for up to 1 minute
     33     proxy_cache bookwyrm_cache;
     34     proxy_cache_valid any 1m;
     35     add_header X-Cache-Status $upstream_cache_status;
     36 
     37     # ignore the set cookie header when deciding to
     38     # store a response in the cache
     39     proxy_ignore_headers Cache-Control Set-Cookie Expires;
     40 
     41     # PUT requests always bypass the cache
     42     # logged in sessions also do not populate the cache
     43     # to avoid serving personal data to anonymous users
     44     proxy_cache_methods GET HEAD;
     45     proxy_no_cache      $cookie_sessionid;
     46     proxy_cache_bypass  $cookie_sessionid;
     47 
     48     include /etc/nginx/conf.d/locations;
     49 }