summaryrefslogtreecommitdiff
path: root/conf/nginx.conf
blob: 1c176bc478c5729e0edc804125b84d37d6029359 (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
user dumpfmprod;
worker_processes  5;
error_log  /home/dumpfmprod/prod/log/nginx/error.log;
pid        /var/run/nginx.pid;

events {
    worker_connections  1024;
    # multi_accept on;
}

http {
    include         /etc/nginx/mime.types;
    access_log      /home/dumpfmprod/prod/log/nginx/access.log;

    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;

        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;
        }
    }
}