LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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, 11:44 AM   #1
AdultFoundry
Member
 
Registered: Jun 2015
Posts: 282

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 12:10 PM.
 
Old 01-07-2016, 02:54 PM   #2
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
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, 03:10 PM   #3
AdultFoundry
Member
 
Registered: Jun 2015
Posts: 282

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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:20 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
Open Source Consulting | Domain Registration