Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

Directories with no index file

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  proxypass in virtual host only  
Author Message
user2708

External


Since: Mar 10, 2004
Posts: 2



(Msg. 1) Posted: Wed Mar 10, 2004 7:27 pm
Post subject: Directories with no index file
Archived from groups: alt>apache>configuration (more info?)

I've just set up a small web site served by Apache 1.3.29 and I have a
little concern about it : I have one directory called "shared" where I
put JavaScripts, pictures (basically non HTML stuff). There is no index
file in this directory.

As a consequence, if you go to http://site/shared/ Apache returns a list
of all existing files in this directory.

I was wondering if this was considered bad practice and if so, why ? Is
there a way to avoid this (I thought of putting a fake empty index file,
but maybe there is something better : I searched for something like
DirectoryIndex none, but this doesn't exist...)

--
Vincent

 >> Stay informed about: Directories with no index file 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 2) Posted: Wed Mar 10, 2004 7:27 pm
Post subject: Re: Directories with no index file [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Vincent <vincent..RemoveThis@wanadoo.fr> wrote:
 > I was wondering if this was considered bad practice and if so, why ?

Is never a nice idea to have someone snooping at your filesystem.

 > Is there a way to avoid this

Just use the Options -Indexes in your httpd.conf.

Davide

--
| Remember, UNIX spelled backwards is XINU.
|
|
|<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Directories with no index file 
Back to top
Login to vote
user2708

External


Since: Mar 10, 2004
Posts: 2



(Msg. 3) Posted: Wed Mar 10, 2004 11:28 pm
Post subject: Re: Directories with no index file [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Davide Bianchi wrote:
 > Vincent <vincent..RemoveThis@wanadoo.fr> wrote:
 >
  >>I was wondering if this was considered bad practice and if so, why ?
 >
 >
 > Is never a nice idea to have someone snooping at your filesystem.
 >
 >
  >>Is there a way to avoid this
 >
 >
 > Just use the Options -Indexes in your httpd.conf.
 >
 > Davide
 >

Since I only have access to .htaccess (I don't run Apache myself), I
added Options -Indexes as the only line of this file and put this file
in the directory I wanted to "hide" (share).
But then if I request a page that uses images in "share", pictures won't
get served (only get the ALT text).
If I directly ask for <a style='text-decoration: underline;' href="http://site/share/" target="_blank">http://site/share/</a> I get a error 500 (internal
server error) : does this mean I have no right to use this Options line
? Or did I do something wrong ?

Thanks anyway for the idea.

Vincent.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Directories with no index file 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 4) Posted: Wed Mar 10, 2004 11:28 pm
Post subject: Re: Directories with no index file [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Vincent <vincent. RemoveThis @wanadoo.fr> wrote:
 > If I directly ask for <a style='text-decoration: underline;' href="http://site/share/" target="_blank">http://site/share/</a> I get a error 500 (internal
 > server error) : does this mean I have no right to use this Options line
 > ? Or did I do something wrong ?

No, probably there is something wrong with the format of the .htaccess
file. If you created the file on Windows and then copied it on Unix
it's possible that the end-of-line chars (CR+LF) of Windows give
problems to Unix (that only uses LF). You should check the error log
of apache to be sure and to really see what's the problem.

Davide

--
| It was one of those perfect summer days -- the sun was shining, a
| breeze was blowing, the birds were singing, and the lawn mower was
| broken ... -- James Dent
|<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Directories with no index file 
Back to top
Login to vote
alrdbg

External


Since: Feb 11, 2004
Posts: 8



(Msg. 5) Posted: Thu Mar 11, 2004 3:49 pm
Post subject: Re: Directories with no index file [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

in .htaccess:

Options none


AR


Vincent wrote:

 > I've just set up a small web site served by Apache 1.3.29 and I have a
 > little concern about it : I have one directory called "shared" where I
 > put JavaScripts, pictures (basically non HTML stuff). There is no index
 > file in this directory.
 >
 > As a consequence, if you go to <a style='text-decoration: underline;' href="http://site/shared/" target="_blank">http://site/shared/</a> Apache returns a list
 > of all existing files in this directory.
 >
 > I was wondering if this was considered bad practice and if so, why ? Is
 > there a way to avoid this (I thought of putting a fake empty index file,
 > but maybe there is something better : I searched for something like
 > DirectoryIndex none, but this doesn't exist...)
 >
 > --
 > Vincent
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Directories with no index file 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
the index.htm won't autoload - Hi, I'm very new at running apache, so this should be a very easy question for most of you. When I connect to my site, it doesn't load the index.html file. It opens its own index that displays the contents of the files in the directory. What setting i...

Index of /files/ - When I put some files in a directory /files/ for download and include no HTML file the client who surfs to www.myhost.com/files/ gets to see a 'directory view' with download links. Below the links it also lists the Apache and PHP versions active. Index....

[2.0.48] About index.html.var and index.html - ( I use Apache 2.0.48 on XP Prof) Under Apache 1.x I simply dumped my html files in the webroot folder and 'it' worked. I am struggling to get my simple .HTML website running under 2.x I see some things have changed dramatically in the conf files. I..

index.pl not loading - Hi all! I do have a problem that my application is not loading properly. Example of my problem: Let's say i do have a portal application at: http://sample.domain.com/portal/index.pl When i enter that URL in the browser the portal loads just fine. When ...

Index Server on Apache? - Good afternoon, Does anyone know if Apache has an equivalent of IIS's Index Server - or alternatively is there an easy method for searching documents for keywords, using Apache? Many thanks in advance. Cheers, Andy
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]