Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Users

limiting diretory/file content?

 

 

Apache users RSS feed   Index | Next | Previous | View Threaded


netrek at gmail

Nov 25, 2009, 8:39 PM

Post #1 of 3 (381 views)
Permalink
limiting diretory/file content?

I wish to use Apache 2.2 to limit where users may go. I wish to avert
the so-called "fishing" where a user sees:

(note that I will be using name based virtual hosts to host multiple
domains on the same physical server/same ip)

http://www.site.org/whatever/something.html and tries to access
http://www.site.org/whatever/

I would like it on a directory basis, a file basis may be needed later
but not for now.

How may I achieve this? A sample config info would be appreciated
since I never did this before :)

If a user tries to access a forbidden directory I wish to display a
custom message to them like "Stop that!" or something so also how may
I do that?

Thanks and Happy Thanksgiving!
Zach

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd
" from the digest: users-digest-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


imedina at grosshat

Nov 25, 2009, 10:29 PM

Post #2 of 3 (356 views)
Permalink
Re: limiting diretory/file content? [In reply to]

> http://www.site.org/whatever/something.html and tries to access
> http://www.site.org/whatever/
>
> I would like it on a directory basis, a file basis may be needed later
> but not for now.

Which rule would you set to disable access? Rule based on IP for instance?

> If a user tries to access a forbidden directory I wish to display a
> custom message to them like "Stop that!" or something so also how may I
> do that?

You can do that by .htaccess combining rule for no access and customized
page for message.

iƱ


aw at ice-sa

Nov 26, 2009, 1:48 AM

Post #3 of 3 (362 views)
Permalink
Re: limiting diretory/file content? [In reply to]

Zachary Uram wrote:
> I wish to use Apache 2.2 to limit where users may go. I wish to avert
> the so-called "fishing" where a user sees:
>
> (note that I will be using name based virtual hosts to host multiple
> domains on the same physical server/same ip)
>
> http://www.site.org/whatever/something.html and tries to access
> http://www.site.org/whatever/
>
> I would like it on a directory basis, a file basis may be needed later
> but not for now.
>
> How may I achieve this? A sample config info would be appreciated
> since I never did this before :)
>
> If a user tries to access a forbidden directory I wish to display a
> custom message to them like "Stop that!" or something so also how may
> I do that?
>
the easiest way :
http://httpd.apache.org/docs/2.2/mod/mod_dir.html#directoryindex

set a global DirectoryIndex to the error page you want, and override it
in <Directory> sections where you want something else.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd
" from the digest: users-digest-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd

Apache users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.