LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-15-2001, 06:14 AM   #1
philfighter
Member
 
Registered: Apr 2001
Location: South of Atlanta
Distribution: Mandrake 8.1, Suse 7.0
Posts: 207

Rep: Reputation: 30
Lightbulb


where is the web directory on most servers?
 
Old 05-15-2001, 01:31 PM   #2
KevinJ
Member
 
Registered: Feb 2001
Location: Colorado Springs, CO
Distribution: Redhat v8.0 (soon to be Fedora? or maybe I will just go back to Slackware)
Posts: 857

Rep: Reputation: 30
It can vary greatly, but you can easily determine where it is by looking at the httpd.conf file.
"DocumentRoot" specifies where this is located.
 
Old 05-15-2001, 01:58 PM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
You can customize as well and put as you feel necessary to your own configuration.
 
Old 05-16-2001, 05:21 AM   #4
philfighter
Member
 
Registered: Apr 2001
Location: South of Atlanta
Distribution: Mandrake 8.1, Suse 7.0
Posts: 207

Original Poster
Rep: Reputation: 30
thanks guys...yu have helped me crack a mystery...my book that comes with suse never mentions Document Root...THANKS!
 
Old 05-16-2001, 03:09 PM   #5
philfighter
Member
 
Registered: Apr 2001
Location: South of Atlanta
Distribution: Mandrake 8.1, Suse 7.0
Posts: 207

Original Poster
Rep: Reputation: 30
Root Document not finding document!

Ok...I redirected the Root Document to /home/hseritt/httpd. In that directory I created a sample html document. It is called apachetest.html. Next I went to the console and used the following command>>lynx http://prodigius.seritt.net/apachetest.html and it gave a 404 error. What did i do wrong?
 
Old 05-16-2001, 03:47 PM   #6
KevinJ
Member
 
Registered: Feb 2001
Location: Colorado Springs, CO
Distribution: Redhat v8.0 (soon to be Fedora? or maybe I will just go back to Slackware)
Posts: 857

Rep: Reputation: 30
Does http://localhost/apachetest.html work?

What are the permissions for apachetest.html? What are the permissions for the /home/hseritt/httpd directory?
 
Old 05-17-2001, 08:14 AM   #7
hazza96
Member
 
Registered: Apr 2001
Location: Brisbane, Australia
Distribution: Ubuntu
Posts: 146

Rep: Reputation: 15
You also need to check the permissions for home and hseritt
 
Old 05-19-2001, 05:38 AM   #8
philfighter
Member
 
Registered: Apr 2001
Location: South of Atlanta
Distribution: Mandrake 8.1, Suse 7.0
Posts: 207

Original Poster
Rep: Reputation: 30
my web directory (Root Document) has been redirected in httpd.conf to home/hseritt/httpd...i have made this into a directory that contains one test.html file. the file has been set to where I as a user have permissions and such but i still get a 404 error. whats wrong with it?
 
Old 05-20-2001, 02:10 AM   #9
KevinJ
Member
 
Registered: Feb 2001
Location: Colorado Springs, CO
Distribution: Redhat v8.0 (soon to be Fedora? or maybe I will just go back to Slackware)
Posts: 857

Rep: Reputation: 30
Web browsing is done as an anonymous user. Not as you.
You need to give World permissions to that dir and the files in it.

chmod 755 /home/hseritt/httpd
chmod 755 /home/hseritt/httpd/*
 
Old 05-22-2001, 05:35 AM   #10
philfighter
Member
 
Registered: Apr 2001
Location: South of Atlanta
Distribution: Mandrake 8.1, Suse 7.0
Posts: 207

Original Poster
Rep: Reputation: 30
Please for give me if yu think this is a stupid question but...why chmod 755? what is the 755 for? is that some type of code to denote anonymous user priviledge?

thanks!
 
Old 05-22-2001, 05:40 AM   #11
philfighter
Member
 
Registered: Apr 2001
Location: South of Atlanta
Distribution: Mandrake 8.1, Suse 7.0
Posts: 207

Original Poster
Rep: Reputation: 30
ok...tried it...the chmod 755 and i still get...

<b>Forbidden

You don't have permission to access /apachetest.html on this server.


Apache/1.3.12 Server at prodigius.seritt.net Port 80</b>

what next?
 
Old 05-22-2001, 07:05 AM   #12
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
The 755 stands for the read-write-execute for the particular access and rights to a directory or file.
When you see -rwxr--r-- taht indicates that root has full access to the file, and the user and groups only have read access.
Read=4, Write=2 and Execute=1, that is what the numbers represent when they are added up. If you want full access for a regular user, you would indicate a 7, cause if you add 4+2+1=7
Just do a man chmod for that manual pages on it for full detail.
 
Old 05-22-2001, 08:29 AM   #13
hazza96
Member
 
Registered: Apr 2001
Location: Brisbane, Australia
Distribution: Ubuntu
Posts: 146

Rep: Reputation: 15
Don't forget that not only the direectory that you are using as your web dir needs to be world writeable EVERY parent directory needs to be as well.

If the anonymous user can't change into the parent (/home/hseritt) then it doesn't matter what the permissions are further down.

I would advise against using your home dir as the web root, unless you don't care that every anonymous user is able to see what is in your home dir.

I would use /home/www (or /home/httpd) as the web root as all anon users have access to the /home anyway and you can just give them access to the httpd dir.

mkdir /home/httpd
chmod 755 /home/httpd
 
  


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
FC3 web directory unwriteable dkw Fedora 0 06-24-2005 03:01 PM
Where's the users web directory? AppleMan Linux - Newbie 9 03-13-2004 06:48 PM
Who should own my web directory reesee Linux - Security 4 03-04-2004 12:16 AM
Listing a web directory Radicalm16 Linux - Software 3 06-14-2003 11:05 AM
WEB-INF directory is not created...? Hai Thanh To Linux - Software 0 06-17-2002 10:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:30 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