LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-07-2016, 12:44 PM   #1
AdultFoundry
Member
 
Registered: Jun 2015
Posts: 245

Rep: Reputation: Disabled
Changing document root for Apache httpd


Default DocumentRoot is:

/var/www/html

I have a hosting plan, with all of the storage space installed on /home.

I figured that I will change the DocumentRoot to:

/home/www/html

Does it make sense, or should I use something else? Why, what would be the implications?

Thanks.

### Edit:

The question would be whether I should just change the DocumentRoot (I already did) or use the Alias directive?

Last edited by AdultFoundry; 01-07-2016 at 01:10 PM.
 
Old 01-07-2016, 03:54 PM   #2
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,686
Blog Entries: 23

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
personally, there is nothing against you doing that, but (personally, again) I'd keep /home and the document root separated...unless you have a solid reason to do this otherwise.
If you talk FTP, then that is different, once logged in via FTP, you "should"....get in your home folder anyway...
Melissa
 
Old 01-07-2016, 04:10 PM   #3
AdultFoundry
Member
 
Registered: Jun 2015
Posts: 245

Original Poster
Rep: Reputation: Disabled
I already put it there. This is from "Pro Apache, 3rd", Apress:

"Its quite usual for the document root to be moved somewhere else to distance the publicly accessible Web site or Web sites from any sensitive Apache configuration files. This also makes upgrading or replacing the Apache installation simpler. So to specify the default document
root, either of the following will do:

DocumentRoot htdocs
DocumentRoot /usr/local/apache/htdocs

For your server, youre going to place your Web site in its own directory inside a directory called www well outside the server root in /home:

DocumentRoot /home/www/alpha-complex/web

This naming scheme will serve you well if you decide to host multiple Web sites, as you can then add more directories under /home/www."

It is ok to put it there, based on that.
 
  


Reply


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
[SOLVED] Apache cant see document root crowx Linux - Newbie 11 02-10-2011 12:21 AM
apache httpd document problem emanresu Linux - Software 2 07-09-2006 06:36 PM
Changing document root in Apache on OpenBSD 3.8 klemen *BSD 2 09-23-2005 03:56 AM
changing permissions of document root and cgi-bin abtimoteo Ubuntu 2 08-13-2005 10:36 AM
Document Root in Apache Hal Linux - Newbie 2 10-28-2003 07:10 AM


All times are GMT -5. The time now is 08:44 PM.

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