Was having some trouble hosting a wordpress site from a subfolder of the domain, ‘/blog’. The permalinks just would not work until I found this solution:
I only had to adapt it slightly for my situation:
location /blog/ {
try_files $uri $uri/ /blog/index.php?$args;
}
I had tried several other solutions but they had results such as losing the css. This worked for me!