httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Hicks <johnl...@gulfbridge.net>
Subject Re: [users@httpd] JSP pages and Apache 2
Date Wed, 03 Aug 2005 19:34:11 GMT
Stephen Carville wrote:
> During a migration from Apache 1 to Apache 2 I found a problem with 
> DirectoryIndex in VirtualHosts
> 
> I have several Virtual Hosts defined with a DirectoryIndex:
> 
> <VirtualHost *:80>
>     ServerName      www.nationwide-totalflood.com
>     DocumentRoot    /var/jakarta/dpsi-corp/ROOT
>     DirectoryIndex  HomePage.jsp index.html
>     JkMount         /*.jsp  worker1
>     JkMount         /servlet/* worker1
> </VirtualHost>
> 
> Problem is if I use the above DirectoyIndex, Apache always displays
> index.html.  If I remove index.html then HomePage.jsp is passed to
> tomcat normally.  I can work around this but it is frustrating that
> Apache 2 should behave so differently from Apache 1.
> 

The DirectoryIndex directive merely tells Apache what file to serve  if 
no file is requested (i.e. if a directory only is specified). In other 
words, this file is served in place of a directory listing (or index).

If you don't want to display index.html, the simplest solution would be 
to delete that file from the directory. (If you do want to display it, 
but not as a directory index, why not rename it to something other than 
"index"?)

Hope that helps.

John Hicks


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


Mime
View raw message