Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forbidden You don't have permission to access ...

Status
Not open for further replies.

gnubie

Programmer
Apr 16, 2002
103
US
Apache 2.0.55 installed and configured on WinXP/w/sp2.
Can run cgi scripts ok.

Entering the following URL in browser:


expecting to see pic.jpg, but got

Forbidden You don't have permission to access i:/images/product/pic.jpg on this server

In httpd.conf, I'm using the directive:

Code:
<Directory "i:/images/product">
#
# Controls who can get stuff from this server.
#
    Order allow,deny
    Allow from all
</Directory>

There are no .ht* files in path.

Any ideas what is wrong? How to troubleshoot?

GN
 
i'm not to familair with running apache on windows, but im pretty sure you dont want the i: in the directory.

Maybe make an alias to that path instead of what your trying to do. Something like:

Alias /myimages "i:/images/product
 
OK, I gave it a shot -- no change.

I used the Win drive because the installed hppd.conf used it. For example, it used:

Code:
<Directory "E:/Apache/Apache2/htdocs">

However, I did learn something. It also doesn't display the Apache docs using:

Code:
http:/localhost/E:/Apache/Apache2/htdocs/index.html

I got the the same Forbidden error (diff path, though).

Does that suggest anything?

GN
 
That is the main docroot. Try:
.. that should load whatever is in the document root.

Back to up above i:\images\product is not in your server root (e:\apache\apache2\htdocs)

If you want to access a directory not in your document root, you have to create an alias entry. To the best of my knowledge, this should work:

Code:
Alias /myimages "i:/images/product"

<Directory "i:/images/product">
#
# Controls who can get stuff from this server.
#
    Order allow,deny
    Allow from all
</Directory>

Regardless, apache usually tends to work better in the unix enviroment.
 
The last bits of info that you need is:

The once you have added the alias directives that axman505 has listed & restarted apache, the url to the file in question will be
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top