[nycphp-talk] where in filesystem to install php application
Ajai Khattri
ajai at bitblit.net
Wed Jul 1 13:11:47 EDT 2009
On Wed, 1 Jul 2009, Eddie Drapkin wrote:
> Every application that I run is a new user that doesn't have
> permission to r/w out of its /home/ so that collaboration with people
> on several projects means no one's snooping anyone else's sourcecode.
> The apache user is in all of their groups, for obvious reasons :P
Not that that stops application *code* from snooping other folders... :-)
Generally, if the whole server is dedicated to one app, then I would just
create a user and put the application under that. Since the whole server
is dedicated to the app, you can make sym links to different versions (a
la Rails deployment) and organize the folders any way you like.
For shared hosting, these days I create folders named after the domain
under /home/vhosts (i.e. /home/vhosts/domain.com), inside each I have the
usual cgi-bin, htdocs and logs folders and an etc folder for files that
should never be web-accessible. For most modern frameworks, like Cake or
symfony, most of the code lies in etc, with only images, css,
Javascript and the front controllers in htdocs. This setup is similar to
mail server setups using qmail with vpopmail, where all the mailboxes live
under /home/vpopmail/domains.
--
Aj.
More information about the talk
mailing list