Welcome!

Websphere Authors: Maureen O'Gara, Robert Eve, Dustin Amrhein, Christopher Keene, Yeshim Deniz

Related Topics: Websphere

Websphere: Article

Setting Up a File Server with WebDAV on IBM HTTP Server

Don't let the mainframe platform scare you away

Julian Kamil's etechcetera Blog

IBM HTTP Server (IHS) is a derivative of Apache with extensions to support the IBM WebSphere Application Server (WAS). It is different enough that you can’t simply interchange it with the plain Apache if you have to support WAS applications. Nevertheless, it is still an Apache derivative, and therefore it supports Apache modules and extensions and behaves more or less as expected.

Recently, I ran into a requirement to set up a file server on an IBM zSeries mainframe platform running various WAS components and applications. To cut a long story short, this customer requirement eventually translates into having a WebDAV file server set up on existing IHS instances on the mainframe.

Well, don’t let the mainframe platform scare you away. This system runs Linux on System z — or zLinux — virtual machines with Novell SUSE Linux Enterprise Server (SLES) as the operating system. From the application and system administrative perspectives, the operating system is just another flavor of 64-bit Linux — not much different from the Intel x86 version of SLES. As a matter of fact, with very little difficulty, I have been able to set up clusters of Ruby on Rails application servers to support a Google Maps Enterprise and ESRI ArcGIS mashup application on this same mainframe platform. But that’s another story that I will have to share with you another time…

So, even though there aren’t many explicit instructions out there on how to set up WebDAV on IHS on zLinux, I was able to do it by following the vanilla instructions for doing the same with Apache, testing the set up on a local Intel-based virtual machine running SLES, and finally implementing the same set up on the target mainframe platform. For your enjoyment, here are the steps that you can follow to replicate what I have done.

Step #1: Enable DAV modules

To do this, find the main IHS configuration file httpd.conf, which should be located in /opt/IBM/HTTPServer/conf directory, and uncomment the directives that load modules/mod_dav.so and modules/mod_dav_fs.so. Obviously, you will need to have root privileges to be able to do this. Next, add a directive at the end of the configuration file to load httpd-dav.conf which we will create in the next step.

...
LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so
...
Include /opt/IBM/HTTPServer/conf/httpd-dav.conf

Step #2: Configure DAV for the file server storage

Next, you need to create the configuration directives that will enable DAV for the directory on the server that you want to serve. In my case, I had an NFS partition mounted in /files that I wanted to use as the file server storage. In /files, I created a subdirectory called dav that I made readable and writeable to the IHS instance, which runs as user nobody of group nobody. This is the directory where uploaded files and collections — the DAV terminology for folders — will reside. In addition, I had to create a subdirectory to hold the lock files that will be created by the DAV modules, also made readable and writeable to the IHS instance.

# mkdir /files/dav
# chown nobody:nobody /files/dav
# mkdir -p /opt/IBM/HTTPServer/var/DAVLock
# chown nobody:nobody /opt/IBM/HTTPServer/var/DAVLock

The configuration directives for enabling DAV for the /files/dav directory resides in /opt/IBM/HTTPServer/conf/httpd-dav.conf and looks like the following:

DAVLockDB /opt/IBM/HTTPServer/var/DAVLock
DAVMinTimeout 600
Alias /files/ "/files/dav/"
Alias /files  "/files/dav"
<Directory "/files/dav">
    DAV           On
    Options       +Indexes
    AuthType      Basic
    AuthName      "DAVney File Server"
    AuthUserFile  "/opt/IBM/HTTPServer/conf/user.passwd
    AuthGroupFile "/dev/null"
    <LimitExcept POST GET>
        Require valid-user
    </LimitExcept>
</Directory>

Step #3: Create DAV users

To complete the set up, you will need to create the file that will hold the valid DAV users and their hashed password. I did this by using the htpasswd executable that comes with IHS.

# cd /opt/IBM/HTTPServer/conf
# ../bin/htpasswd -c user.passwd joe
New password: ******
Re-type new password: ******
Adding password for user joe

Finally, you are ready to rock and roll. Restart IHS and use a DAV client to connect to your new DAV file server!

# /opt/IBM/HTTPServer/bin/apachectl restart

If you have access to a Windows XP workstation, open the Internet Explorer web browser, select menu item File > Open, select Open as Web Folder checkbox and type the URL to the DAV file server in the text field, like so: http://joe@<dav_server>:80/files/ — replace <dav_server> with the IP address or name of your DAV server. You can then upload and download files and folders using drag-and-drop actions to and from the DAV file server. There are other freely available WebDAV clients that you can use, such as SkunkDAV, Novell NetDrive, and DAVExplorer. To use these clients, however, you will have to download and install their executables on your Windows XP workstation.

More Stories By Julian I. Kamil

Julian I. Kamil works for a large company which has over 300,000 employees worldwide and is in the business of technology innovation. He also runs an open source project that produces a type of wiki engine written in the Ruby programming languag called Pandora. You can find more information about it at http://pandora.rubyveil.com/pandora.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.