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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

403-Forbidden: Which permissions must I set?

Status
Not open for further replies.

cadbilbao

Programmer
Apr 9, 2001
233
ES
Hello.

Apache/1.3.26 (Unix)

I want users not to browse the contents of a directory, and I want them to see this message when trying '
403-Forbidden
You don't have permission to access /mydirectory/ on this server.

Wich permissions must I set?

Thank you very much. Merry Xmas.
 
In your httpd.conf file, set the following directive:
Code:
<Directory /mydirectory>
    Options -Indexes
</Directory>
Restart the server so the settings are re-read. All set.

As for the custom 403 error message, I'm pasting straight from the example httpd.conf file from Mandrake 9.0:
Code:
# Customizable error response (Apache style)
#  these come in three flavors
#
#    1) plain text
#ErrorDocument 500 &quot;The server made a boo boo.
#  n.b.  the single leading (&quot;) marks it as text, it does not get output
#
#    2) local redirects
#ErrorDocument 404 /missing.html
#  to redirect to local URL /missing.html
#ErrorDocument 404 /cgi-bin/missing_handler.pl
#  N.B.: You can redirect to a script or a document using server-side-includes.
#
#    3) external redirects
#ErrorDocument 402 [URL unfurl="true"]http://some.other_server.com/subscription_info.html[/URL]
#  N.B.: Many of the environment variables associated with the original
#  request will *not* be available to such a script.

Ok, lots of comments, but it covers it all :) --
JR
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top