LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-21-2009, 01:24 PM   #1
JPDemole
LQ Newbie
 
Registered: May 2009
Posts: 3

Rep: Reputation: 0
Apache Document Root conflict


Hello,

I have a VPS (Mosso Cloud Server) that is administered and monitored by Platinum Server Mgmt. I have CentOS 5 and Apache 2.2 installed.

I requested that my Document Root be set to /var/www/JPDemole.com/ and also a subdomain setup to /var/www/test.JPDemole.com/

They responded by telling me that it would, "[This would] cause a problem with the permissions and that it will be a permissions conflict if you set them to /var/www/. For security and compatibility purposes, they should be in /home/username/.... It can be put anywhere in there."

This is the first time I've been involved with any server administration, but while coding on numerous private vps's before, they had a setup similar to what I was requesting.

Am I incorrect in my understanding of the previous situations and the Mgmt company is in fact correct?

Thanks,
JP
 
Old 05-22-2009, 08:27 AM   #2
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 420Reputation: 420Reputation: 420Reputation: 420Reputation: 420
From my understanding, the management company is likely correct. For Apache, it doesn't matter (much) where files reside, as long as the apache config files point the correct domain to the correct disk location. For example, www.JPDemole.com could point to /home/JPDemole/Productionserverdirectory and test.JPDemole.com could point to /home/JPDemole/TestServerDirectory. The contents of those directories are completely under your control, so what the users see when they get to either www or test would depend on what you had there.
 
Old 05-22-2009, 11:35 AM   #3
JPDemole
LQ Newbie
 
Registered: May 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Hm... if you're correct, then wouldn't that make me correct? Meaning, apache doesn't care where the files are as long as you point the DocumentRoot to the directory.

They said that it MUST resides somewhere in the /home/user/ directory. I was requesting it be placed in the /var/www/ directory. I understand on a shared network that allowing users to place files outside their user area is prohibitive, but since it's my own private server, I don't see the problem.

Right now, they're looking into it, so we'll see.
 
Old 05-22-2009, 12:30 PM   #4
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by JPDemole
They said that it MUST resides somewhere in the /home/user/ directory.
That's obviously untrue from a technical standpoint. Perhaps they have a formal policy that encourages a DocumentRoot residing in users' home directories? And they enforce it on both shared and exclusive servers for consistency? Dunno.
 
Old 05-22-2009, 12:56 PM   #5
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 420Reputation: 420Reputation: 420Reputation: 420Reputation: 420
I suspect it does boil down to a security issue that they simply don't want to deal with. By having the files in /var/www, you would have to have read-write access, which you probably don't currently. By keeping this in your /home directory (where you presumably already have read-write access) security doesn't change. It could also be they have monitoring systems (like samhain) that look for changes in the system files. For a lot of these, you can customize which directories are watched, and if they watch /var/www, then they would either have to NOT watch it or deal with a lot of false-positives from your changes.

At any rate, the larger point I was trying to make is that since it doesn't matter where the files are, insisting on /var/www is simply a waste of time. There is absolutely no reason to prefer /var/www over any other location and I suspect you aren't going to get very far with this as the provider is they one who has to deal with the security issues.
 
Old 05-22-2009, 01:37 PM   #6
JPDemole
LQ Newbie
 
Registered: May 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Hangdog42 View Post
I suspect it does boil down to a security issue that they simply don't want to deal with. By having the files in /var/www, you would have to have read-write access, which you probably don't currently. By keeping this in your /home directory (where you presumably already have read-write access) security doesn't change. It could also be they have monitoring systems (like samhain) that look for changes in the system files. For a lot of these, you can customize which directories are watched, and if they watch /var/www, then they would either have to NOT watch it or deal with a lot of false-positives from your changes.

At any rate, the larger point I was trying to make is that since it doesn't matter where the files are, insisting on /var/www is simply a waste of time. There is absolutely no reason to prefer /var/www over any other location and I suspect you aren't going to get very far with this as the provider is they one who has to deal with the security issues.
That makes sense - the monitoring and such. As I said, not too knowledgeable in the way on actual admin skills... just enough to be dangerous I suppose.

The only reason for the /var/www/ was for personal preference of organization. Old habits I guess.

Thanks for the responses guys. Great stuff.

D
 
  


Reply

Tags
apache, documentroot


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache - change document root? squall14716 Linux - Software 2 01-20-2010 11:16 AM
Apache Document Root Re-Direct? carlosinfl Red Hat 1 07-09-2007 08:45 PM
altering document root for apache pbhj Linux - Server 3 09-04-2006 08:05 PM
Apache 2: won't allow document root to be changed, plus more QtCoder Linux - Networking 1 11-06-2004 05:44 PM
Document Root in Apache Hal Linux - Newbie 2 10-28-2003 07:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration