summaryrefslogtreecommitdiffstats
path: root/deployment/nginx.site
blob: cd21099518654db594ba44d2d0d6c2e0d926698e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
server {
    listen 80 default_server;
    server_name vending.waw.hackerspace.pl;

    location / {
        proxy_pass http://127.0.0.1:5000;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }

    listen 443 ssl default_server;

    ssl_certificate /var/lib/dehydrated/certs/vending.waw.hackerspace.pl/fullchain.pem;
    ssl_certificate_key /var/lib/dehydrated/certs/vending.waw.hackerspace.pl/privkey.pem;

    if ($scheme = http) {
        return 301 https://$server_name$request_uri;
    }
}