I solved this by adding this to nginx.conf
<--snip>
}
location /files {
autoindex on;
autoindex_exact_size off;
}
<--snip>
And this is my server block
<--snip>
server {
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
}
<--snip>
I am not sure what effect it had, but I also changed the root and sites available path from /var/www/html to /var/www