logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: 403 Forbidden
Author
taylor



Joined: 04 Jan 2007
Posts: 4

PostPosted: Thu 04 Jan '07 1:10    Post subject: 403 Forbidden Reply with quote

I'm getting a 403 error from a directory I have set up as an alias in Apache. Strange thing is it was working yesterday. I don't remember what I changed. How do I trouble shoot this?

*note: I am very much a beginner.
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Thu 04 Jan '07 3:24    Post subject: Reply with quote

A couple of things to check:
    Can the account that Apache is running in access the files in the directory you Alias'd to?

    Is there anything in the logs/error.log (Unix/Linux) or logs\error.log (Windows) which sheds any light on the access problem?

    Is the directory you Alias'd to a local directory on your computer? (vs. on a remote computer)

While succinct questions are appreciated - your's may be a little too brief to let us guess about your problem.

It helps if you say which version of Apache you are running on which operating system.

A little more detail about your Alias directive and any associated <Directory> section in your httpd.conf file would be helpful too
- but please don't post your entire httpd.conf file.

See Forum Rules for some advice about how much detail to include with your question.

-tom-
Back to top
taylor



Joined: 04 Jan 2007
Posts: 4

PostPosted: Thu 04 Jan '07 5:41    Post subject: Reply with quote

Thanks, Tom.

I Alias'd to the htdocs (local directory) in the Apache 2.2 folder, and I can access that directory just fine.

The error log says, "client denied by server configuration: C:/DIRECTORY/", but I'm not sure what to make of that.

I've tried all kinds of permutations of OPTIONS and such in the <Directory> section.

Also, I'm running Windows.
Back to top
taylor



Joined: 04 Jan 2007
Posts: 4

PostPosted: Thu 04 Jan '07 6:39    Post subject: Reply with quote

Nevermind. I have solved the problem. Something was pointing to C:/php5 when it should have been pointing to C:/php in my php.ini file.

Thanks anyway.
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Thu 04 Jan '07 6:40    Post subject: Reply with quote

Perhaps it is the Allow/Deny directives. These control which IP addresses can to access a directory.

The default httpd.conf sets directory "/" to Deny from all, so you must explicitly grant access to any directory you want Apache to make available.

Most likely there already is a <Directory> somewhere in httpd.conf which grants access to htdocs, so that's why it doesn't cause any 403 errors.

You could try adding this to your httpd.conf:
Code:
<Directory "C:/DIRECTORY">
    Options Indexes
    Order allow,deny
    Allow from all
</Directory>


Note that forward-slashes are used in the directory name (even though it is Windows), and there is no trailing slash.

Hope this helps...

-tom-

Edit: I guess our posts collided! Glad you got it running. I didn't know PHP could cause a "client denied by server configuration" error.
Back to top


Reply to topic   Topic: 403 Forbidden View previous topic :: View next topic
Post new topic   Forum Index -> Apache