LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 10-26-2003, 11:44 AM   #1
Hal
Member
 
Registered: Oct 2003
Location: East Anglia, England
Distribution: Dapper Drake / Slackware
Posts: 151

Rep: Reputation: 30
Document Root in Apache


Ok, so I spent ages looking for folder with the Apache test page inside. On the page it says it needs to be replaced. I have decided that it is just one of those things you don't find by looking for it...

So I had a look at httpd.conf and it says the document root is /var/www/html (on RedHat 9) I presume this is where I have to dump my .php .html, etc, files to be served out by Apache. Since I only want to test my pages, and not serve them out to the internet, they only need to work on the localhost. The problem is that it doesn't allow any new folders to be created there, and doesn't allow for copy and paste of any files.

So why doesn't it allow me to put my files there? Do I need special permissions? Or am I wanting to put my files in the wrong place?

If anyone has any information about setting up Apache just to test .php etc on RedHat 9 it would be appreciated.
 
Old 10-26-2003, 11:59 AM   #2
tgflynn
Member
 
Registered: Oct 2003
Location: Rochester, New York (USA)
Distribution: Debian
Posts: 119

Rep: Reputation: 15
By default the Document Root directory will probably be owned by root. Therefore you will only be able to modify files there if logged in as root.

There are a couple of ways around this. You could create a group called, for example, web and add yourself to it. Then as root do the following :

cd /var
chgrp -R web www
chmod -R g+rw www

A simpler solution for testing might be to use user directories. Most Apache installations are set up by default to give access to a directory called "public_html" directly under any user's home directory. To access such a site the URL to use is :

http://localhost/~username

Tim
 
Old 10-28-2003, 06:10 AM   #3
Hal
Member
 
Registered: Oct 2003
Location: East Anglia, England
Distribution: Dapper Drake / Slackware
Posts: 151

Original Poster
Rep: Reputation: 30
Thanks for 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
Apache - change document root? squall14716 Linux - Software 2 01-20-2010 10:16 AM
Changing document root in Apache on OpenBSD 3.8 klemen *BSD 2 09-23-2005 02:56 AM
Apache 403 when changin document root. webgovernor Linux - Newbie 3 04-20-2005 12:54 AM
Apache 2: won't allow document root to be changed, plus more QtCoder Linux - Networking 1 11-06-2004 04:44 PM
Apache Document Root Path bowen Linux - General 8 11-29-2002 02:13 AM


All times are GMT -5. The time now is 07:21 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration