I have been using symfony for a long time as a php framework. In the role of the web server nginx + php-fpm, I noticed that many do not use the wonderful thing that nginx can do.
The script described below is suitable for projects written in symfony in principle for any projects, but I personally use this example for symfony. Create virtual hosts without a hands-on! ;)
Suppose you have a directory with projects - / var / www / git / ... The condition is that we refer to the project directories as well as hosts. For example, /var/www/git/sait.ru. (if you want www. to work, then you just need to make a symlink to this folder (ln -s ...)). Total: just create a host in / etc / hosts and log in to nginx. He will pick up the projects in your working directory. server { listen 80; root /var/www/git/$host/web; # server_name _; charset utf-8;