It is surprisingly non-trivial to configure Nginx to serve two different PHP applications on the same domain, one being in a logical subdirectory.

I spent a few hours scouring the web and trying different things. I ended up with this configuration, thanks from a source (of which I lost track. Sorry!)

The configuration file defines a server listening for server mysite.com on port 80. The WordPress application is located in /var/www/wordpress and the Symfony application is located in /var/www/symfony.

When a browsers requests the http://mysite.com/subdirectory resource, the request is passed to the Symfony app. Otherwise, the request goes to the WordPress app.