jwberger wrote:
I completely agree that it is most likely an issue with my config.  I am
pretty new to Apache.  Below is the complete config. I know I probably did
not do some things correctly, but it is working good for except for this one
thing that has just come up.

No problem.  This forum is the right place for that.
As the final response will show, it just helps people here (for helping you) if you provide the full information from the start. Just 2 lines with
Apache version : x.y.z
platform : x.y v 0.3
already narrow down the issue quite a bit.
(And in this case, it would have helped a lot to mention that you are using Apache as a proxy to a WebLogic cluster; but let's not get ahead of ourselves).

I am going to give you some personal comments below, which you might decide to use or not. Just based on personal experience.



ServerRoot "C:/Program Files/Apache Software Foundation/Apache2.2"

This is the standard installation path for the Apache/Windows MSI installer.
It is OK, but I dislike it, because the path contains spaces, and spaces in paths will always bite you somewhere down the line. (E.g. when you call a script with another script and forget to quote things properly).

In my opinion, the person who invented paths with spaces in them should get an Ig Nobel prize.


Listen 168.127.1.19:8081

This could probably just be
Listen 8081

As you put it above it is valid, but it means that this Apache server will listen *only* on requests that come in on the interface that has that specific IP address. For example, it would not listen for requests on the "loopback" interface (127.0.0.1), and it would not listen anymore if ever you changed the IP address of the server.


LoadModule actions_module modules/mod_actions.so
...
OK
...

<IfModule mod_wl_22.so>
        WebLogicCluster 168.127.136.85:9060
        KeepAliveEnabled ON
        KeepAliveSecs 30
        FileCaching OFF
</IfModule>

<Location /PartnersQueryService>
        SetHandler  weblogic-handler
        WebLogicCluster 168.127.136.85:9060
</Location>

The above and similar sections are not standard Apache stuff, and belongs to your WebLogic add-ons.
This is intriguing.  Where from did you get this Apache ?


<Location /tpg>
        AuthType basic
        AuthBasicProvider ldap
        AuthName "Partners"
        SetHandler test
        Order deny,allow
        Deny from all
        Allow from all
#       AuthLDAPURL ldap://boris.fnc.net.local:389/o=directory1.fnc.fujitsu.com
        AuthLDAPURL
ldap://rchdmzldapd1.fnc.fujitsu.com:389/o=directory1.fnc.fujitsu.com
        AuthzLDAPAuthoritative off
        Require valid-user
</Location>>

Ok, so far we are in what is called the "main configuration", meaning outside of any VirtualHost section. If you are using VirtualHost sections, then all this stuff in fact describes default values, that will be used by each VirtualHost later defined, unless that VirtualHost re-defines that particular parameter itself.

Next, I have taken out your <VirtualHost> section, because where it was located in your configuration file, it was a bit confusing.

All the following directives, being also outside of the <VirtualHost> section, are in fact member of the same group as the ones above. They belong to the main configuration, and also act as defaults for all VirtualHosts.



ServerAdmin ad...@localhost
ServerName 168.127.1.19:8081
This is, again, just a default value. It is in fact never used in this case.


DocumentRoot "D:/docs"
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>
Nitpick: the "Options FollowSymlinks" above does not seem to be useful, since you are forbidding access to "/" anyway (and rightly so).

<Directory "D:/docs">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>

So it would seem that indeed you set the DirectoryIndex directive in the main configuration, and that it should thus be inherited by all VirtualHosts. Then why is it not working ? Mmmm.

...

I moved the <VirtualHost> section here at the end, because it seems more logical to first have all the default directives applying to all VirtualHosts, and then the definition of these VirtualHosts.

>
> <VirtualHost 168.127.1.19:8081>

So this is not a name-based VirtualHost system, it is an IP-based VirtualHost system, which is quite a different animal.

>     ServerAdmin ad...@localhost
>     DocumentRoot "D:/docs"
>     ServerName 168.127.1.19:8081
>     ServerAlias 168.127.1.19:8081
> #    UseCanonicalName off
>     ErrorLog "logs/partners3/error.log"
>     CustomLog "logs/partners3/access.log" common
>     SetEnvIf Remote_Addr "168\.127\.1\.59" dontlog
>     RewriteEngine On
>     RewriteOptions Inherit
>     RewriteCond %{REQUEST_METHOD} ^TRACE
>     ReWriteRule .* - [F]
> </VirtualHost>
>

The VirtualHost section does not redefine DirectoryIndex. The mystery gets thicker..

But let's get back to your section
<Location /tpg>

In that section, you have a line
        SetHandler test
(just like in other sections, you have a line
        SetHandler  weblogic-handler

Now THAT is the reason why your DirectoryIndex is not working !
By this SetHandler directive, you are in fact telling Apache not to generate the content by itself, but to "delegate" (or proxy) this call to some add-on module. So Apache gives this request (any request for any URL starting with /tpg) to the "test" or to the "weblogic-handler" module, and expects this module to generate the response. And, presumably, these handlers have no idea that they should look for an "index.html" file in some directory. So they return whatever response they would return when give a URL of "/tpg" (probably, an error), and then Apache returns that response to the browser.

It is only when Apache is asked to generate the content itself, with its own "default handler", that the DirectoryIndex directive will be invoked. In your case, Apache is not looking for anything, on disk or elsewhere. It is just passing the request to the module that you indicated as the handler.

Do the following test :
Add a new section as follows :

<Location /tpg/indextest>
  SetHandler none
  DirectoryIndex index.html
</Location>

then make sure that you have a directory C:/Docs/tpg/indextest, and that it contains an "index.html" file.
Then request http://hostname/tpg/indextest and see what happens.


Because this is a sub-location of /tpg, and /tpg is defined to use the "test" handler (supposing it exists), we have to override this if we want Apache to use its normal own code to provide the response for a URL of /tpg/something.
From there the "SetHandler none".
See : http://httpd.apache.org/docs/2.2/mod/core.html#sethandler

Also, it would have been impossible for anyone to find this out, if they did not see the full configuration above.

---------------------------------------------------------------------
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-unsubscr...@httpd.apache.org
  "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to