If you want to optimize your environment, check out the https://hub.docker.com/r/nginxproxy/nginx-proxy project. It can save you the trouble of dealing with nginx configuration directly. However, for local development, I recommend installing PHP locally and using different wrappers on your local PHP server, like https://github.com/symfony-cli/symfony-cli. These can be helpful (and, of course, it allows you to easily use different versions of php).