Welcome to WebmasterWorld Guest from

Forum Moderators: bakedjake

Message Too Old, No Replies

DocumentRoot for user's directories

I'm having trouble figuring this one out



7:49 am on Jul 20, 2002 (gmt 0)

10+ Year Member

Hey everybody,

I'm just setting up the Apache server on Mac OS X, and I'm having a problem...

I'm using the include() function in PHP, and in order to make my code portable, I'm including based on the Apache variable DocumentRoot.

What I want to do is be able to set the DocumentRoot variable differently for each user's directory, so that, for example:

localhost/~user1 - their DocumentRoot is /home/usr/user1/html


localhost/~user2 - their DocumentRoot is /home/usr/user2/html

Right now, DocumentRoot is global for everything, and it's based on the file locations of localhost/, which isn't in a user's directory.

Any ideas??? Can I do it globally, or should I be doing this in a .htaccess file for each user, and in either case, how do I do it???

Thanks in advance...


8:21 am on Jul 20, 2002 (gmt 0)

10+ Year Member

I am sure someone will tell you exactly how to do it, but to get you started, look for VirtualHomePages.conf in the vhosts directory in httpd/conf I haven't tried it, or would give more detail

Featured Threads

Hot Threads This Week

Hot Threads This Month