Re: OT: hide directory listing on server

2009-02-18 Thread Lloyd Budd

On Feb 18, 10:08 am, PeteDK  wrote:
>
> However when i go to .com/media/profile_pics/ i get a directory
> listing of all the folders in this directory.

The easiest solution is just to put a blank index.html file in the
directory.

We do the equivalent in WordPress, example wp-content/index.php
contains



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: OT: hide directory listing on server

2009-02-18 Thread PeteDK



On 18 Feb., 19:14, Ramiro Morales  wrote:
> On Wed, Feb 18, 2009 at 4:08 PM, PeteDK  wrote:
>
> > Hi. I know this is not really Django related, but this is one of the
> > best forums out there so i hope you can help me :-)
>
> > The thing is, i have a django website.
>
> > The media files are handled by the apache server instead of django,
> > which works great.
>
> > However when i go to .com/media/profile_pics/ i get a directory
> > listing of all the folders in this directory.
>
> > Can i disable this?? so its not possible to "browse" all the profile
> > pics, without knowing the exact path of a given file.
>
> You can disable Apache mod_autoindex
>
> http://httpd.apache.org/docs/2.2/mod/mod_autoindex.html
>
> for that directory.
>
> But the easiest way to avoid the generation of the directory content
> listing is simply creating an empty index.html file there.
>
> --
>  Ramiro Morales

Thanks. I found another solution that works :) created a .htaccess
file in the directory and put Options -Indexes in it :-)

So problem solved :)

good day to all djangoniacs out there :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: OT: hide directory listing on server

2009-02-18 Thread Jirka Vejrazka

> However when i go to .com/media/profile_pics/ i get a directory
> listing of all the folders in this directory.
>
> Can i disable this?? so its not possible to "browse" all the profile
> pics, without knowing the exact path of a given file.


Hi Peter,

  read the Summary section of
http://httpd.apache.org/docs/2.2/mod/mod_autoindex.html

  You could also completely remove the mod_autoindex from Apache, but
make sure that it won't have any unwanted side effects on your
website.

  Cheers

   Jirka Vejrazka

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: OT: hide directory listing on server

2009-02-18 Thread Ramiro Morales

On Wed, Feb 18, 2009 at 4:08 PM, PeteDK  wrote:
>
> Hi. I know this is not really Django related, but this is one of the
> best forums out there so i hope you can help me :-)
>
> The thing is, i have a django website.
>
> The media files are handled by the apache server instead of django,
> which works great.
>
> However when i go to .com/media/profile_pics/ i get a directory
> listing of all the folders in this directory.
>
> Can i disable this?? so its not possible to "browse" all the profile
> pics, without knowing the exact path of a given file.

You can disable Apache mod_autoindex

http://httpd.apache.org/docs/2.2/mod/mod_autoindex.html

for that directory.

But the easiest way to avoid the generation of the directory content
listing is simply creating an empty index.html file there.

-- 
 Ramiro Morales

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



OT: hide directory listing on server

2009-02-18 Thread PeteDK

Hi. I know this is not really Django related, but this is one of the
best forums out there so i hope you can help me :-)

The thing is, i have a django website.

The media files are handled by the apache server instead of django,
which works great.

However when i go to .com/media/profile_pics/ i get a directory
listing of all the folders in this directory.

Can i disable this?? so its not possible to "browse" all the profile
pics, without knowing the exact path of a given file.

I hope you get my meaning.

kind regards.

Peter Møller
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---