summarylogtreecommitdiffstats
path: root/ente-web-nginx-example.conf
blob: 0790279fd220dd669f8c68797181b4ea568b3158 (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
server {
    server_name ente.yourdomain.com;
    error_log /var/log/nginx/ente-error.log info;
    access_log /var/log/nginx/ente.access.log;
# your http/acme config/includes
}


server {
    listen 443 ssl http2;
    server_name ente.yourddomain.com;

    ssl_certificate /etc/nginx/tls/ente.yourdomain.com/fullchain.pem;
    ssl_certificate_key /etc/nginx/tls/ente.yourdomain.com/privkey.pem;
# your https config/includes
#	include /etc/nginx/https.conf;

        location / {
            root   /usr/share/webapps/ente;
            index  index.html index.htm;
        }

    location /gallery {
# ugly hack should be fixed
        try_files $uri /./gallery.html;
    }

    location /api {
# could be written nicer
        rewrite ^/api/(.*)$ /$1 break;
     	proxy_pass http://10.23.0.7:8080;
        proxy_http_version 1.1;
        proxy_set_header Connection "";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;	       
    }

	# Set the timeouts
        proxy_connect_timeout 3600s;
        proxy_send_timeout 3600s;
        proxy_read_timeout 3600s;
        client_body_timeout 3600s;
        client_header_timeout 3600s;
}