Forum Moderators: phranque

Message Too Old, No Replies

Location of htdocs directory in RedHat

Suggestions?

         

AprilS

7:49 pm on Jul 13, 2004 (gmt 0)

10+ Year Member



I'm setting up a new server (RedHat ES) and just curious if there is somewhat of a standard location for vhosts and their htdocs?

I've always used FreeBSD and the directory was always like:
/usr/local/www/vhosts

/usr/local/www/vhosts/domain.com/htdocs

Just curious if there is any sort of accepted standard for RedHat or if it is ad-hoc style? ;-) I just want to do it right (clean) since I am starting from scratch on this server.

Thanks!

encyclo

7:59 pm on Jul 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Usually (but not always) I've seen the virtual hosts on Linux servers set in the user's home directories, so you get:

/home/username/

And the htdocs replaced by public_html:

/home/username/public_html/

I don't think there's any set standard, though.

AprilS

11:36 pm on Jul 13, 2004 (gmt 0)

10+ Year Member



Ok... This is what our hosting company said as well. I just wasn't sure as it just seemed unusual to me to put all vhosts in different directories.

Are there any security risks of placing them in each users directory?

Also, I'm assuming you would create a user similar to the domain:
/home/domain

Hmmm - though I haven't experienced it yet, it seems like it may get a little crazy in the "/home" directory once I get all the users added plus the vhosts/domains.... any thoughts?

encyclo

12:11 am on Jul 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Are there any security risks of placing them in each users directory?

No more than the setup you were previously used to - in effect you were creating user directories under

/usr/local/www/vhosts/
. Also, since you can mount
/home
on a separate partition, your security may be increased, especially if you can lock down the
/usr
partition. As for the number of directories, there will be no more than in
/usr/local/www/vhosts/
.

Setup may be easier too, with each user having an account created for them, which is their login name. Set their shell to

/bin/false
unless you want them to have shell access, then configure your FTPd to login directly into their home directory. In
/etc/skel/
you can add
public_html
,
cgi-bin
and any other standard directories, and you're all set.