aboutsummaryrefslogtreecommitdiffstats
path: root/deskutils/py-paperless-ngx/files/nginx.conf.in
blob: f85117eb58a368e352036bdf0964049977f7c10f (plain) (blame)
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
52
53
54
55
56
57
58
59
worker_processes  1;
events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    types {
        text/javascript js mjs;
    }


    #sendfile        off;
    keepalive_timeout  65;

    upstream django {
        server 127.0.0.1:8000;
    }

    server {
        listen 443 ssl;
        http2 on;
        server_name example.com;

        ssl_certificate selfsigned.crt;
        ssl_certificate_key selfsigned.key;

        location /static/ {
            alias %%WWWDIR%%/static/;
        }

        location / {
            proxy_pass http://django;
            include uwsgi_params;
            proxy_set_header Host $host;
            proxy_http_version 1.1;
        }

        location /ws/status/ {
            proxy_pass http://django/ws/status/;
            proxy_set_header Host $host;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
        }

        #location /flower/ {
        #    proxy_pass http://127.0.0.1:5555;
        #    proxy_set_header Host 127.0.0.1;
        #    proxy_http_version 1.1;
        #}

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   /usr/local/www/nginx-dist;
        }
    }
}