Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
apache "Forbidden" error .....
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
an0nymity
n00b
n00b


Joined: 06 Jul 2002
Posts: 25

PostPosted: Wed Dec 18, 2002 4:56 pm    Post subject: apache "Forbidden" error ..... Reply with quote

I have emerged net-www/apache, dev-db/mysql, dev-php/mod_php

#ebuild /var/db/pkg/dev-php/mod_php-4.2.3-r2/mod_php-4.2.3-r2.ebuild config

Hard coded mod_php in the /etc/apache/conf/apache.conf

#/etc/init.d/apache start

Using the default directory that apache is set to originally in the apache.conf, I can browse the web server fine. If I change the root directoy to where I have my php web pages, I get the following error in Mozilla, IE, and Netscape:

Code:
Forbidden
You don't have permission to access /admin.php on this server.

Apache/1.3.27 Server at krillan.an0nymity.com Port 80



here is the error I get in /var/log/apache/error_log:

Code:
Wed Dec 18 11:27:33 2002] [crit] (98)Address already in use: make_sock: could not bind to port 80
[Wed Dec 18 11:44:43 2002] [crit] (98)Address already in use: make_sock: could not bind to port 80


Does anyone have any clues, what is causing this? I'd appreciate any help.

Thanx,
An0nymity
Back to top
View user's profile Send private message
pilla
Bodhisattva
Bodhisattva


Joined: 07 Aug 2002
Posts: 7729
Location: Underworld

PostPosted: Wed Dec 18, 2002 5:44 pm    Post subject: Reply with quote

Please take a look at this thread. Looks similar, but I am not sure.
Back to top
View user's profile Send private message
an0nymity
n00b
n00b


Joined: 06 Jul 2002
Posts: 25

PostPosted: Wed Dec 18, 2002 5:58 pm    Post subject: Reply with quote

Yeah, I did see that thread, but I don't quite understand what it is telling one to do, to resolve the problem. Smack me for being ignorant, but I'd like to have a little more indepth detail on what to do, so I have a better understanding what is happening.
Back to top
View user's profile Send private message
mooman
Apprentice
Apprentice


Joined: 06 Nov 2002
Posts: 175
Location: Vancouver, WA

PostPosted: Wed Dec 18, 2002 7:45 pm    Post subject: Reply with quote

If it were me running into that problem, here's what I would try:

1. Stick a plain HTML file (not .PHP) in that "new" root directory and see if you can access it. That will help isolate if it's the php interpreter or the directory itself.

2. If # 1 failed, check the permissions on that "new" root directory (and the directories above it) and confirm they all have execute set for all users. This is needed (I believe) for apache to traverse through those directories.

3. If #1 worked, try sticking a minimal PHP file in that directory. Something like <? echo "hello"; ?> and see if that works. If yes, then there is something that "admin.php" is trying to do that is the problem. If not, then all PHP itself seems to be the problem.

I don;t have a lot of mod_phpp background so can't help you with the nitty gritty there...

Hope any of this helps.
_________________
Linux user off and on since circa 1995
Back to top
View user's profile Send private message
MoonWalker
Guru
Guru


Joined: 04 Jul 2002
Posts: 510

PostPosted: Wed Dec 18, 2002 8:09 pm    Post subject: Reply with quote

an0nymity wrote:
Yeah, I did see that thread, but I don't quite understand what it is telling one to do, to resolve the problem. Smack me for being ignorant, but I'd like to have a little more indepth detail on what to do, so I have a better understanding what is happening.


The "depth" of it are, first of all apache set up very strict rules for access, starting with <Directory / > (root) Rules here </Directory>, to ensure no one is slipping in behinde the sceens. It practically means no acceess at all. Then rules are set up for standard web root <Directory /home/apache/htdocs> rules here </Directory>, if you have webpages you want accessable somewhere else outside of /home/apache/htdoc (or what ever path you have for it), you have to set up similar access rules for access under that path. <Directory /path/to/your/pages> rules </Directory>

It's pretty simple... and logical. Basicly you can copy the rules under your standard path.
_________________
/Joakim

Living on earth is expensive, but it includes a free trip around the sun
every year.
Back to top
View user's profile Send private message
an0nymity
n00b
n00b


Joined: 06 Jul 2002
Posts: 25

PostPosted: Wed Dec 18, 2002 8:36 pm    Post subject: Reply with quote

Okay ... I have everything resloved, thanks for everyones help and suggestions. I greatly appreciate it, I have a tendency to understand more complicated scenarios, than more logical ones, go figure. Everyone here seems to be very helpful. Props go out for everyone.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum