LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 12-21-2001, 08:12 PM   #1
morbo
Member
 
Registered: Dec 2001
Posts: 53

Rep: Reputation: 15
403 Forbidden???


I have finally got Apache running on my box without crashing, a large step in my Linux training. However, I am having a few problems understanding the following.....

I have an account setup called 'user'

I can get the root site working fine (by putting htmls in var/www dir). But when I try to acces a user's site (http://localhost/~user) I get a 403 forbidden preventing me from seeing a dir listing. Also-when I try to access http://localhost/~user/file.html I get a forbidden error as well.

What directive do I need to change to get rid of this? I haven't modified the httpd.conf file from the default that comes with Redhat 7.1....

Thanks,
Jeff
 
Old 12-21-2001, 08:28 PM   #2
jayrusman
LQ Newbie
 
Registered: Dec 2001
Posts: 8

Rep: Reputation: 0
mkdir ~user/public_html

mkdir ~user/public_html
and put an index.html there?
 
Old 12-21-2001, 11:05 PM   #3
morbo
Member
 
Registered: Dec 2001
Posts: 53

Original Poster
Rep: Reputation: 15
No, because to my understanding the path '/home/user' is represented on the web as 'http://localhost/~user'

Am I correct?

Basicaly-I want people to be able to ftp in and upload their own sites and be able to access them via the web by 'http://localhost/users homepage'
 
Old 12-22-2001, 01:19 AM   #4
jayrusman
LQ Newbie
 
Registered: Dec 2001
Posts: 8

Rep: Reputation: 0
Try!

Try my suggestion above, and see if it works though.

Also, /home/user and /home/user/public_html must have appropriate rx permissions for the apache uid/gid (nobody) to read them.

Last edited by jayrusman; 12-22-2001 at 01:21 AM.
 
Old 12-22-2001, 01:28 AM   #5
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
basically by default is is public_html under the UserDir in httpd.conf file in which you can change to whatever, some create a folder in the users directory called WWW or www and then change the following in httpd.conf under the UserDir directive.
create the public_html or change it to www and make the changes in httpd.conf then restart the server.. now place the html files in the users /home/www or /home/public_html directory and that should work for you. you should access their pages by typing in the domain followed by their /~user/index.html or whatever you have the html named. its best to start off with index.html as it will automatically load there.

by default it is set to public_html , might want to check your httpd.conf file just in case if this is # commented out to bypass this option in or under UserDir
 
Old 12-22-2001, 01:29 AM   #6
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Quote:
Originally posted by morbo
Basicaly-I want people to be able to ftp in and upload their own sites and be able to access them via the web by 'http://localhost/users homepage'
oh, if you want users to be able to ftp, your going to have to setup separate ftp accounts to your server for that to work and enable a ftp server.
 
Old 12-22-2001, 12:26 PM   #7
morbo
Member
 
Registered: Dec 2001
Posts: 53

Original Poster
Rep: Reputation: 15
Yeah-I have the ftp set up just fine-and I have created a dir under /home/user called 'public_html'....

I think the problem is my permissions, how would I go about changing them?

L:ike I said-the ftp is working fine, I can get into the /home/user dir just fine but when I make the dir 'public_html' and put my htmls in it-I get the 403 forbidden.....

Any ideas?

Jeff
 
Old 12-22-2001, 01:50 PM   #8
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
check your permissions, and you can change them with the chmod command..
 
Old 12-22-2001, 02:07 PM   #9
morbo
Member
 
Registered: Dec 2001
Posts: 53

Original Poster
Rep: Reputation: 15
All dirs are chmod'd to 755-still no luck!!!!!

Also-I just noticed that when I make a dir in '/var/www' (called' test') and try to access it from:

http://localhost/test I get a dns error-although the httpd is still running fine, I can access any file in 'var/www' fine but anything in a sub-dir (other than cgi-bin) I get a dns error...

I'm thinking my config files are extremely misconfigured.

Anything anyone can suggest before I completely re-install apache?

Jeff
 
Old 12-27-2001, 01:22 AM   #10
vcheah
Member
 
Registered: Nov 2001
Distribution: redhat 8.0
Posts: 110

Rep: Reputation: 15
i have the ssame problem too ..... - i reinstall the apache already but still doesn't work.
 
Old 06-06-2002, 09:32 AM   #11
denise2002
LQ Newbie
 
Registered: Jun 2002
Location: scotland
Posts: 1

Rep: Reputation: 0
I would like to know how to get access to a forbidden 403 account that i had access to not long o
 
Old 07-04-2002, 11:17 AM   #12
vdavid23
LQ Newbie
 
Registered: Jul 2002
Location: Longmont
Distribution: Mandrake 8.2
Posts: 1

Rep: Reputation: 0
Lightbulb 403 forbidden error

When I did a fresh install of Mandrake 8.2 with Apache I got this error when trying to access my websites that I had stored on another drive. I was upgrading from NT 2000 using IIS 5.0 so I had my original websites that were working before stored on another drive.

I spent 3 days looking for a solution to the 403 error I was getting when I tried accessing my websites. I had everything setup correctly in Apache (at least I thought). And I kept dinking arounf with my virtual server settings. I even changed the path in Apache for my default website to make sure it was not a webpage error.

My website pulled up fine when I did this but even though I duplicated the settings in my default site with the new Virtual site I created for my website I still got a 403 error.

The solution: You need to make the changes in the directives.
Once I added lines to my commonhttpd directive in Apache for my vitual server and the path where my websites were located I was then able to pull up my websites without this error showing up anymore. I have more information about the steps you go through to do this on my website.
http://www.coloradobusiness.tv

I hope this helps others who maybe having the same problem I was.
 
  


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
403 Forbidden 1veedo Linux - Newbie 2 11-27-2005 06:46 PM
apache 403 forbidden? wezhousheng Linux - Networking 5 05-13-2005 01:15 AM
403 Forbidden patpawlowski Linux - Newbie 1 04-26-2005 10:20 AM
403 Forbidden JanDeMan Linux - Newbie 7 04-12-2004 04:02 PM
403 forbidden Flawless Slackware 4 03-04-2003 08:24 AM


All times are GMT -5. The time now is 01:45 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration