1130

Run WorldClient under Apache web server

The below instructions will allow you to run WorldClient on Apache.

Download and install Apache 2.0.46 (We used the default installation so everything ends up in C:\Program Files\apache group\apache2\)

Try to start Apache from the command line and check if it is working (http://127.0.0.1)

Locate your server configuration file called http.conf (Should be in c:\Program Files\apache group\apache2\conf) and open it in Notepad or another text editor

First, we have to assign .dll to an isapi.  Locate a line called 'AddHandler type-map var'.  After this line insert: 'AddHandler isapi-isa .dll'.

Now, we have to allow access to the MDaemon directory, with ExecCGI Privileg.  Don't use backslashes, use slashes for paths!  Insert anywhere:

Options ExecCGI

AllowOverride None

Order allow,deny

Allow from all

If your only purpose is serving WorldClient then we simply could change the DocumentRoot from 'C:/Program Files/Apache Group/Apache2/htdocs' to 'c:/MDaemon/WorldClient/HTML'.  Now if someone goes to http://127.0.0.1 we will see an 'Access Denied' error.  That's ok, because we only allowed ExecCGI in our Options statement.  To jump directly to WorldClient (and WorldClient is handled by ExecCGI) we catch every request getting the root directory and redirect them to WorldClient. 

Add the following line:

RedirectMatch^/$ http://127.0.0.1/WorldClient.dll?View=Main

(note: If you want to browse your MDaemon directory you have to write 'Options ExecCGI Indexes'.  Don't click on worldclient.dll, it will crash the apache-thread handling worldclient.dll.  You should remove Indexes on real servers)

We are done; start Apache from the command line.  If anything went wrong, read the error.log file in c:\Program Files\apache group\apache2\logs\ and the application event log carefully.  The logs are very detailed.

If you are using Virtual Hosts it is nearly the same.  Somewhere you should have (with different IP of course):

NameVirtualHost 192.0.2.124

After this statement you're able to define your VirtualHosts or VirtualWebservers.  Remember, they only work if you call them with a valid domain name, such as www.example.com:

ServerAdmin user01@example.com

DocumentRoot c:/MDaemon/WorldClient/HTML
RedirectMatch ^/$http://www.example.com/WorldClient.dll?View=Main
ServerName www.example.com
ErrorLog c:/logs/www.my-personal-mdaemon-webserver.com-error.log
CustomLog c:/logs/www.example.com-access.log combined