You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Alain Roger <ra...@gmail.com> on 2008/01/19 19:00:04 UTC

[users@httpd] how to avoid content folder to by read

Hi,

I would like to know how to avoid any user to read the content of my website
folder using is browser?
i mean the if i have the following thing :

www.myweb.com/welcome/welcome.php
www.myweb.com/welcome/info.php

if user type www.myweb.com/welcome/, he will see 2 files and the parent
directory tree :-(

thanks a lot,

-- 
Alain
------------------------------------
Windows XP SP2
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008

Re: [users@httpd] how to avoid content folder to by read

Posted by Joshua Slive <jo...@slive.ca>.
On Jan 20, 2008 6:01 AM, Alain Roger <ra...@gmail.com> wrote:
> Hi Joshua,
>
> i did the following thing but it does not work, even if i restarted apache
> services (under windows)
> <Directory "D:/webserver/myweb/welcome/">
>   Options -Indexes
>   Deny from all
>  </Directory>
>
> what's wrong ?

There is another <Directory> section with an Options directive that is
overriding that one, most likely. Go through httpd.conf (and any other
config file you are using) and remove "Indexes" from every Options
directive you find.

Joshua.

---------------------------------------------------------------------
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


RES: [users@httpd] how to avoid content folder to by read

Posted by Ismael Milach da Silveira <mi...@gmail.com>.
Nt the most elegant way to do it, but until you can put Joshua's solution
up, why don't you just create a blank index.html... (you must have
DirectoryIndex index.html )
  
So if they try: 
www.myweb.com/welcome/
 
It would open that blank page.
 

Cheers,
Ismael
 



________________________________

De: Alain Roger [mailto:raf.news@gmail.com] 
Enviada em: domingo, 20 de janeiro de 2008 08:02
Para: users@httpd.apache.org
Assunto: Re: [users@httpd] how to avoid content folder to by read


Hi Joshua,

i did the following thing but it does not work, even if i restarted apache
services (under windows)
<Directory "D:/webserver/myweb/welcome/">
  Options -Indexes
  Deny from all
</Directory>

what's wrong ?

A.


On Jan 19, 2008 7:56 PM, Joshua Slive <jo...@slive.ca> wrote:


	On Jan 19, 2008 1:00 PM, Alain Roger <ra...@gmail.com> wrote:
	> Hi,
	>
	>  I would like to know how to avoid any user to read the content of
my 
	> website folder using is browser?
	> i mean the if i have the following thing :
	>
	> www.myweb.com/welcome/welcome.php
	> www.myweb.com/welcome/info.php
	>
	> if user type www.myweb.com/welcome/, he will see 2 files and the
parent 
	> directory tree :-(
	
	
	See:
	http://wiki.apache.org/httpd/DirectoryListings
	
	You can fix this with
	<Directory /full/path/to/welcome> 
	Options -Indexes
	</Directory>
	and possibly
	DirectoryIndex welcome.php
	
	Joshua.
	
	
---------------------------------------------------------------------
	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
	
	




-- 
Alain
------------------------------------
Windows XP SP2
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4 
C# 2005-2008 


No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.19.7/1233 - Release Date: 19/1/2008
18:37



No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.19.7/1233 - Release Date: 19/1/2008
18:37
 


---------------------------------------------------------------------
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


Re: [users@httpd] how to avoid content folder to by read

Posted by Alain Roger <ra...@gmail.com>.
Hi Joshua,

i did the following thing but it does not work, even if i restarted apache
services (under windows)
<Directory "D:/webserver/myweb/welcome/">
  Options -Indexes
  Deny from all
</Directory>

what's wrong ?

A.

On Jan 19, 2008 7:56 PM, Joshua Slive <jo...@slive.ca> wrote:

> On Jan 19, 2008 1:00 PM, Alain Roger <ra...@gmail.com> wrote:
> > Hi,
> >
> >  I would like to know how to avoid any user to read the content of my
> > website folder using is browser?
> > i mean the if i have the following thing :
> >
> > www.myweb.com/welcome/welcome.php
> > www.myweb.com/welcome/info.php
> >
> > if user type www.myweb.com/welcome/, he will see 2 files and the parent
> > directory tree :-(
>
> See:
> http://wiki.apache.org/httpd/DirectoryListings
>
> You can fix this with
> <Directory /full/path/to/welcome>
> Options -Indexes
> </Directory>
> and possibly
> DirectoryIndex welcome.php
>
> Joshua.
>
> ---------------------------------------------------------------------
> 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
>
>


-- 
Alain
------------------------------------
Windows XP SP2
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008

Re: [users@httpd] how to avoid content folder to by read

Posted by Joshua Slive <jo...@slive.ca>.
On Jan 19, 2008 1:00 PM, Alain Roger <ra...@gmail.com> wrote:
> Hi,
>
>  I would like to know how to avoid any user to read the content of my
> website folder using is browser?
> i mean the if i have the following thing :
>
> www.myweb.com/welcome/welcome.php
> www.myweb.com/welcome/info.php
>
> if user type www.myweb.com/welcome/, he will see 2 files and the parent
> directory tree :-(

See:
http://wiki.apache.org/httpd/DirectoryListings

You can fix this with
<Directory /full/path/to/welcome>
Options -Indexes
</Directory>
and possibly
DirectoryIndex welcome.php

Joshua.

---------------------------------------------------------------------
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