summaryrefslogtreecommitdiff
path: root/examples/nginx/travelynx.conf
blob: da8426ed4d0ccc1ab23f2859f4c0cde907e9f7ad (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
upstream travelynx {
        server 127.0.0.1:8093;
}

server {
        listen   [::]:80;
        listen   0.0.0.0:80;

        server_name travelynx.de;
        access_log /var/log/nginx/de.travelynx.log anonip;

        rewrite ^/(.*)$ https://travelynx.de/$1 permanent;
}


server {
        listen [::]:443;
        listen 0.0.0.0:443;

        server_name travelynx.de;
        access_log /var/log/nginx/de.travelynx.log anonip;

        location /static {
                expires 1y;
                root /srv/www/travelynx/public;
        }

        location /service-worker.js {
                expires 1d;
                root /srv/www/travelynx/public;
        }

        location / {
                proxy_pass http://travelynx;
                proxy_http_version 1.1;
                proxy_set_header Host $host;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Proto "http";
        }
}