Portal Home > Knowledgebase > Articles Database > Apache Document Root on Linux


Apache Document Root on Linux




Posted by klenwell, 09-05-2007, 01:30 PM
Basic question: does it matter where I set the document root for apache on a Linux system? I've googled this but haven't found a good answer. This is for a VPS server running the Ubuntu (Debian) server os that I'm configuring. I'd prefer to simply create a new directory off the root and set that as the document root in the apache config file. Would this present any kind of security issue? If that's no good, what's the best choice -- stick to the default?

Posted by Tom P, 09-05-2007, 01:41 PM
As long as you change the Apache config file to reflect the new location then you are perfectly free to have it where ever you want. For instance, cPanel installs defaultly use /home/username structure as its quite standard. Obviously don't put it somewhere like the /tmp/ directory but yeah, you can create a folder and put all your files into there

Posted by cygnusd, 09-05-2007, 03:35 PM
Unless you'll be using some WHM software, you might consider sticking to using the Apache defaults by your chosen distro (Debian => /var/www/). If you're doing virtual hosts, check out some standard. To answer you question though, yes, you can put it anywhere but I suppose particular file ownership, umask and permissions apply.

Posted by david510, 09-05-2007, 11:31 PM
No security issue. If this is not your prime need, you may stick to default.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Can't start mysql (Views: 579)