server {
    listen 80;
    server_name {{name}};

    access_log /var/log/nginx/{{name}}.log main;
    error_log /var/log/nginx/{{name}}.err warn;

    ssi on;
    charset utf-8;
    client_max_body_size 30m;
    client_header_buffer_size 16k;
    large_client_header_buffers 16 64k;
    server_tokens off;

    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }

    root /usr/share/nginx/html;

    gzip on;
    # text/html is built-in.
    gzip_types text/plain application/xml text/xml application/x-rss+xml application/xhtml+xml text/css application/javascript application/x-javascript application/json;
    gzip_comp_level 3;
    gzip_min_length 1400;
    gzip_vary on;

    # allow 127.0.0.1;
    # deny all;

    location /static/ {
    }

    location / {
        proxy_pass http://127.0.0.1:8082;
        proxy_http_version 1.1;
        proxy_set_header Connection "";
        proxy_redirect off;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }

    # location / {
    #     include uwsgi_params;
    #     uwsgi_pass 127.0.0.1:8082;
    #     uwsgi_read_timeout 300;
    #     uwsgi_send_timeout 300;
    # }
}
