summaryrefslogtreecommitdiff
path: root/conf/nginx.conf
blob: 3e6cbe58367aa513de69d895650b035e816ea331 (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
43
44
45
46
47
48
49
50
51
user dumpfmprod;
worker_processes  5;
error_log  /var/log/nginx/error.log;
pid        /var/run/nginx.pid;

events {
    worker_connections  1024;
    # multi_accept on;
}

http {
    include         /etc/nginx/mime.types;
    log_format hyphen '$remote_addr | $time_local | '
                        '"$request" | $pipe | $status | $request_time | $bytes_sent | $body_bytes_sent | '
                        '"$http_referer" | "$http_user_agent"';
    access_log      /var/log/nginx/access.log hyphen;
    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;
    tcp_nodelay        on;

    gzip  on;
    gzip_disable "MSIE [1-6]\.(?!.*SV1)";

    include /etc/nginx/conf.d/*.conf;
    
    server {
        listen       80;
        server_name  .dump.fm;
        client_max_body_size 15m;

        location ~* /(avatars|images)/ {
            root     /home/dumpfmprod/prod;
            expires  30d;
        }

        location ~* /static/ {
            root              /home/dumpfmprod/prod;
            expires           5m;
        }

        location / {
            proxy_pass        http://127.0.0.1:8080;
            proxy_redirect    off;
            proxy_set_header  Host $host;
            proxy_set_header  X-Real-IP $remote_addr;
        }
    }
}