Wednesday 17 March 2010

O4W on an Apache Web Server



Aaron Kaplan has recently been working with OpenInsight for the Web (O4W) and I am pleased to hear from him that the toolset has been running nicely under the Apache web server, although some additional configuration steps were required, when compared to configuring it under IIS which is the web server covered in the O4W Quick start Guide. Aaron, was therefore kind enough to email those additional steps to me to share with my blog readers.

The first difference when installing and configuring O4W on Apache, is the requirement for an ASP support module. This is an open source third party module and it can be found at sourceforge.net. Once installed, you will then need to modify your httpd.conf file.

You’ll need to tell Apache and the ASP modules where to find the ASP files and directories. Please note, that in Aaron’s example below, you will need to change the paths to match your paths.


<IfModule mod_aspdotnet.cpp>
    # Mount the example app
    AspNetMount /examples/ "C:/revsoft/oinsight/9.1.1/O4W"

    #Alias in the examples directory to the O4W root
    Alias /examples/ "C:/revsoft/oinsight/9.1.1/O4W/"

    # Allow asp.net scripts to be executed in the O4W root
    <Directory "C:/revsoft/oinsight/9.1.1/O4W/">
        Options FollowSymlinks ExecCGI
        AspNet Files
        Order allow,deny
        Allow from all
        DirectoryIndex Default.htm Default.aspx 
           apache-start.html start.htm
    </Directory>

    # For all virtual ASP.NET webs, we need the 
    # aspnet_client files to serve the 
    # client-side helper scripts.
    AliasMatch /aspnet_client/system_web/
       (\d+)_(\d+)_(\d+)_(\d+)/(.*) \
       "C:/Windows/Microsoft.NET/Framework/
          v$1.$2.$3/ASP.NETClientFiles/$4"

    <Directory \
        "C:/Windows/Microsoft.NET/Framework/
           v*/ASP.NETClientFiles"
>
        Options FollowSymlinks
        Order allow,deny
        Allow from all
    </Directory>
</IfModule>



You will also need to ensure that OECGI2 will run at its default location, which is outside a standard script alias. To achieve this, you will need to add a script handler:

AddHandler cgi-script .exe inside the section.

Once you have made these additional changes, you should be able to run O4W on Apache in the normal way. Aaron’s testing with the current O4W release continues and we will post updates to this blog posting as appropriate.

In the meantime, I would like to extend my thanks to Aaron for working with O4W on Apache and for sharing this information with us.

1 comment:

  1. I have had reports from some clients (via RevUS) who have been using Apache on Windows and they did not have to configure Apache’s ASP. I will update or remove this posting as appropriate.

    ReplyDelete