Run Webmail under Apache web server

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

Note: The setup of Webmail under Apache is NOT supported by Alt-N technical support.  Those who choose to run Webmail under Apache's web-server must be aware of all security issues and ramifications of a configuration such as this.

  • 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 (
  • 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 back-slashes, use slashes for paths! 
    • Insert anywhere:
      • Options ExecCGI
      • AllowOverride None
      • Order allow,deny
      • Allow from all

If your only purpose is serving Webmail 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 we will see an 'Access Denied' error.  That's ok, because we only allowed ExecCGI in our Options statement.  To jump directly to Webmail (and Webmail is handled by ExecCGI) we catch every request getting the root directory and redirect them to Webmail. 

Add the following line:

(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)

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):


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