The solution to my problem turned out to be simple. Before the server{} block in http{}, you need to add
include mime.types;