httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: [users@httpd] protecting directories
Date Mon, 21 Dec 2009 08:38:33 GMT
Zachary Uram wrote:
> I am running Apache 2 in Linux and have several websites.
> 
> Say site A is in /var/www/a and there is a directory /var/www/a/foo/
> and foo/ has 3 .html files but I only wish to serve index.html
> so how do I protect the other files so that people can't fish for the
> name to find them. Also how do I prevent visitors from browsing other
> directories?
> And what if I am using CSS and PHP how can I protect that also? I have
> heard about .htaccess but I don't know how to set this up. Can I see
> someone's file?
> 
It looks like you have a lot of reading of the Apache documentation to 
do, to occupy your Christmas holidays.
Maybe forget .htaccess for now, and look at these :

Your basic page is http://httpd.apache.org/docs/2.2/mod/directives.html
Look at :
Location
Directory
Files
DirectoryIndex
Options  (Indexes)
Allow
Deny

There are plenty of examples in the documentation, written by people who 
really know how Apache works.  They have spent a lot of time writing the 
docs and the examples.  The best way to get on the right path is to 
acknowledge their efforts, and make an effort yourself at reading the 
on-line documentation. All the answers to all your questions above are 
there.

Merry Christmas.

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message