protecting directories
am 21.12.2009 03:02:16 von Zach Uram
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?
Merry Christmas,
Zach
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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
Re: protecting directories
am 21.12.2009 09:38:33 von aw
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 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