Its better to put Symfony 2 in the "root" of the website (www) or in a sub-folder? And why?
Method 1
mysite/www/...
Method 2
mysite/www/symfony2/...
Thanks you in advance
Its better to put Symfony 2 in the "root" of the website (www) or in a sub-folder? And why?
Method 1
mysite/www/...
Method 2
mysite/www/symfony2/...
Thanks you in advance
It is better to put Symfony
folder outside of root web server's folder because only web
folder of Symfony
is meant to be public. By putting whole Symfony
folder under root folder of web server you make all files public.
So best solution is to put Symfony
folder somewhere outside web server's root folder (like /home/developer/symfonyProject
) and then make symbolic link to web
folder somewhere under web server root folder (does not really matter if in root folder or sub folder)
/home/developer/
├─ symfonyProject/
│ ├─ app
│ ├─ (...)
│ └─ web/
/var/www/
├─ symfony (this is link to /home/developer/symfonyProject/web)