Custom permalinks not working when WordPress is in a subdirectory (Nginx)

I followed this thread (linked below), seams like an issue effecting multi sites too. Strangely, switching from Apache to Nginx makes custom permalinks work. For me on the other hand if I switch to Apache, custom permalinks work, but when I switch back to Nginx they’re broken again. Is there any way to get this working with Nginx? Apache is no good for me.