LinuxQuestions.org
Help answer threads with 0 replies.
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, 12:44 PM   #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, 12:59 PM   #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, 07: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 11:16 AM
Changing document root in Apache on OpenBSD 3.8 klemen *BSD 2 09-23-2005 03:56 AM
Apache 403 when changin document root. webgovernor Linux - Newbie 3 04-20-2005 01:54 AM
Apache 2: won't allow document root to be changed, plus more QtCoder Linux - Networking 1 11-06-2004 05:44 PM
Apache Document Root Path bowen Linux - General 8 11-29-2002 03:13 AM

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

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