You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Hannes Gruber <h....@gmx.net> on 2001/08/21 21:50:00 UTC

Re: mod_autoindex/8206: links to subdirectories are missing the terminating / in indexing if fancy indexing is not chosen.

The following reply was made to PR mod_autoindex/8206; it has been noted by GNATS.

From: Hannes Gruber <h....@gmx.net>
To: Marc Slemko <ma...@znep.com>
Cc: apbugs@Apache.Org
Subject: Re: mod_autoindex/8206: links to subdirectories are missing 
  the terminating / in indexing if fancy indexing is not chosen.
Date: Tue, 21 Aug 2001 21:57:00 +0200

 At Tuesday 10:02 21.08.01, you wrote:
 >On Tue, 21 Aug 2001, Hannes Gruber wrote:
 >
 > > At Sunday 17:30 19.08.01, marc@apache.org wrote:
 > > >[In order for any reply to be added to the PR database, you need]
 > > >[to include <ap...@Apache.Org> in the Cc line and make sure the]
 > > >[subject line starts with the report component and number, with ]
 > > >[or without any 'Re:' prefixes (such as "general/1098:" or      ]
 > > >["Re: general/1098:").  If the subject doesn't match this       ]
 > > >[pattern, your message will be misfiled and ignored.  The       ]
 > > >["apbugs" address is not added to the Cc line of messages from  ]
 > > >[the database automatically because of the potential for mail   ]
 > > >[loops.  If you do not include this Cc, your reply may be ig-   ]
 > > >[nored unless you are responding to an explicit request from a  ]
 > > >[developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]
 > > >
 > > >
 > > >Synopsis: links to subdirectories are missing the terminating / in
 > > >indexing if fancy indexing is not chosen.
 > > >
 > > >State-Changed-From-To: open-closed
 > > >State-Changed-By: marc
 > > >State-Changed-When: Sun Aug 19 10:30:11 PDT 2001
 > > >State-Changed-Why:
 > > >If you are not using fancyindexing, then Apache does not go through and
 > > >try to figure out if a file is a directory or not, so it does not know if
 > > >it should add a trailing "/" or not.  That is the way that
 > > >non-fancyindexing works.
 > > >
 > > >Requesting a directory without a trailing "/" works just fine, Apache 
 > then
 > > >redirects you to the name with the trailing "/".  Apparently this isn't
 > > >happening on your system, but you don't provide any details of exactly 
 > how
 > > >it "doesn't work".  Most likely, it is related to
 > > >http://httpd.apache.org/docs/misc/FAQ#set-servername
 > >
 > >
 > > Perfectly correct,
 > > the case is the following: I have two different virtual server
 > > configurations running, one if the server is adressed via the url, and
 > > another if the server is addressed via the IP address. The IP address
 > > answers with the default virtual server entry therefore I set the global
 > > server name to the external IP address. the Virtual server name to the
 > > domain name. If accessed from outside or via the Domain name redirecting
 > > woks fine.
 > > But The server is also accessed through the internal network, where it has
 > > a different IP address 192.186.100.1 this addres does not appear somewhere
 > > in the serverconfiguration (except the NameVirtualHost) but this has
 > > nothing to do with it.
 > >
 > > I think I could add another virtual server to the list like this,
 > >
 > > <VirtualHost 192.168.100.1>
 > >          ServerName 192.168.100.1
 > > </VirtualHost>
 > >
 > > but this would mean, that I would have to administer two VirtualHost
 > > entries for one and the same results.
 > >
 > > Meanwhile i decided to use only fancy indexing. This workaround seems 
 > to be
 > > better.
 >
 >Umh... except that there are any number of other cases where Apache may
 >have to issue a redirect based on the server name.  "UseCanonicalName
 >off" may be an easier, and certainly more correct, fix...
 >
 >But it's your server...
 
 Great, it works like this. Thank you.
 
 but I have some questions still if you don`t mind.
 
 -) What is the intention to have fancy indexing different from the list form?
 -) What are the reason to introduce UseCanonicalName, it seams to me, that 
 UseCanonicalName off works just in any case?
 -) and something compleatly different: as it is not possible to asign 
 absolute path for the location of
       HeaderName .head
       ReadmeName .read
 
 and I do not whant to copy the two files into every directory, is tehere 
 some way to define it in one place for every directory ?
 
 Thanks, Hannes
 
 
 

Re: mod_autoindex/8206: links to subdirectories are missing the terminating / in indexing if fancy indexing is not chosen.

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
From: "Hannes Gruber" <h....@gmx.net>
Sent: Tuesday, August 21, 2001 2:50 PM
>  
>  Great, it works like this. Thank you.
>  
>  but I have some questions still if you don`t mind.
>  
>  -) What is the intention to have fancy indexing different from the list form?

The old 'list form' (plain) was far faster.  Unfortunately, it also potentially displayed
files that, while not accessable to the user, perhaps advertised things you did not want
them aware of.  Apache 2.0 now runs all listings through the same subrequest mechansim,
and if they are declined, it chooses not to display them.

This process causes a lot more cpu, with the advantage that we know if the file is a
directory, so the trailing slash can be displayed on plain autoindex listings.

>  -) and something compleatly different: as it is not possible to asign 
>  absolute path for the location of
>        HeaderName .head
>        ReadmeName .read

Try an absolute URI, as documented (e.g. /indexes/.head instead of /www/docroot/indexes/.head)