summaryrefslogtreecommitdiffstats
path: root/nginx/nginx.conf
blob: 4ab113a0325061d6a5f22736ae6f5a842bbcbafc (plain)
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
38
39
40
41
42
error_log  /var/log/nginx/error.log debug;

http {

    limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s;

    client_body_temp_path /tmp/nginx 1 2;
    proxy_temp_path /tmp/nginx-proxy;
    fastcgi_temp_path /tmp/nginx-fastcgi;
    uwsgi_temp_path /tmp/nginx-uwsgi;
    scgi_temp_path /tmp/nginx-scgi;


    upstream tosca_server {
        server unix:/run/gunicorn/tosca_server.sock fail_timeout=0;
    }


    server {
        listen 8085 ;
        charset     utf-8;
        client_max_body_size 75M;   # adjust to taste

        access_log /var/log/nginx/nginx-access.log;

        location / {
            proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header  X-Forwarded-Proto $scheme;
            proxy_set_header  Host $http_host;
            proxy_redirect    off;

            proxy_pass        http://tosca_server;

            limit_req         zone=one;
        }
    }
} #http

events {
    worker_connections  4096;  ## Default: 1024
}