Location of Apache's DocumentRoot

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Tue Mar 15 20:15:10 UTC 2005


On Tue, Mar 15, 2005 at 02:41:50PM -0500, Stephen wrote:
> First post to this list. I look forward to coming out to the meetings 
> and connecting with helpful people :)
> 
> I have a long computer background, but Linux is still fairly new to me. 
> I have some serious web development to do, and I will be using PHP and 
> MySQL.
> 
> I have invested in a Linux box, and installed Mandrake 10.0.
> 
> I see quite a learning curve....
> 
> Right now, I need to set up the server to look much like a virtual web 
> host. I can't see any guides/rational for determining where to put the 
> documentroot directory. It seems to me it should be under /var but I 
> don't have much confidence that I will make good decisions yet.

Well Debian uses /var/www for Documentroot by default.  I have seen
other distributions use /home/httpd, and I am sure others have done yet
something else.

> Suggestions?
> 
> And how do I set the permissions on this directory? I will need to use 
> ftp to upload the web files.

Well certainly the dir and files have to be readable by the user apache
runs as (although it certainly does not, and probably should not, be
writeable by apache user (ie www-data user on Debian)).  Depending on
config, apache will not follow symlinks at all, or it will only follow a
symlink owned by the same user that owns the target of the symlink or it
will follow all symlinks.  If you use symlinks at all this is owrth
keeping in mind.

Lennart Sorensen
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list