Re: [users@httpd] JSP pages and Apache 2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux