Which directory should I choose for my PHP projects? Should I use ~/public_html in my home directory or should I choose /var/www and change the owner to have write permissions? What would you recommend?
4 Answers
I prefer using something like ~/development/php in my home dir, and then I either add symlink into /var/www or declare a virtual host in Apache pointing to my directory.
3 Comments
ccman
How do you declare a virtual host?
matteomattei
This is my same configuration (~/src/projectname and then a symlink in /var/www/ or /srv/www/)
Milan Babuškov
Depending of your setup, it configured in httpd.conf or vhosts.conf or a similar file. The syntax is explained in Apache docs.