server {

    listen 80;
    root /home/wger;

    location / {
        proxy_pass http://127.0.0.1:8000;
        add_header Access-Control-Allow-Origin *;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_redirect off;
    }

    location /static/ {
        root /home/wger;
        try_files $uri /src/wger/core$uri /mnt$uri /src/wger/software$uri =404;
    }

    location /media/ {
        root /home/wger;
    }

    # Increase max body size to allow for video uploads
    client_max_body_size 100M;

}
