Wednesday, 7 May 2014

IBM HTTP Server - Serving multiple directories via Alias and DocumentRoot and Directory directives

I needed to deliver a simple mechanism for log file access to my developers, so chose to use IBM HTTP Server to provide a simple web-based access to the files, rather than insisting that they log into WebSphere Application Server or use a terminal emulator such as PuTTY ( the servers are hosted on AIX ).

I've done this before, and it's a simple solution.

Here's the relevant directives from httpd.conf for IBM Business Process Manager: -

...
DocumentRoot /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/ProcessCenterJVM

<Directory />
    Options FollowSymLinks
    AllowOverride None
    FileETag All -INode
</Directory>

<Directory "/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/ProcessCenterJVM">
    Options All
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

...

I've highlighted the things that I changed, and that are particularly relevant to the IBM BPM.

Please note that I left the <Directory /> </Directory> stanza alone - this means that my users cannot browse the root file-system served by IHS, only the directories that I specify :-)

This is the URL that I've given my users: -


However, for IBM Operational Decision Manager, I have not one, but two directories to serve up.

The solution is to use the Alias directive, thanks to this StackOverflow article: -


...
DocumentRoot "/opt/IBM/WebSphere/AppServer/profiles/DecisionCenterNode01/logs"
Alias /DecisionCenterLogs "/opt/IBM/WebSphere/AppServer/profiles/DecisionCenterNode01/logs"
Alias /DecisionServerLogs "/opt/IBM/WebSphere/AppServer/profiles/DecisionServerNode01/logs"

<Directory />
    Options FollowSymLinks
    AllowOverride None
    FileETag All -INode
</Directory>

<Directory "/opt/IBM/WebSphere/AppServer/profiles/DecisionCenterNode01/logs">
    Options All
    AllowOverride None
    Order allow,deny
    Allow from all

</Directory>

<Directory "/opt/IBM/WebSphere/AppServer/profiles/DecisionServerNode01/logs">
        Options All
        AllowOverride None
        Allow from all
</Directory>

...

This allows me to specify two URLs: -



Nice :-)

No comments:

Note to self - use kubectl to query images in a pod or deployment

In both cases, we use JSON ... For a deployment, we can do this: - kubectl get deployment foobar --namespace snafu --output jsonpath="{...