Einbinden einer ISAPI-Extenson im Apache Webserver

XAMPP Distribution

Um beim Apache-WebserverISAPI-Applications zu aktivieren sind einige Einstellungen nötig, vor allen Dingen muss das Modul mod_isapi.so eingebunden also geladen werden, ich habe gleich für meine Testumgebung auch das Modul mod_cgi.so hinzugefügt. Es sind natürlich auch Berechtigungen für die Bereiche in denen die Module aktiv sein sollen zu setzen.

Im Folgenden habe ich, am Beispiel einer XAMPP für Windows Installation, einmal aufgeführt welche Punkte beachtet werden müssen, damit in einem neu angelegten Verzeichnis isapi-root unter xampp\ eine ISAPI-Application ausgeführt und mit isapi.localhost im Browser aufgerufen werden kann:

http.conf:

LoadModule isapi_module modules/mod_isapi.so
LoadModule cgi_module modules/mod_cgi.so

<IfModule mime_module>
# AddHandler allows you to start ISAPI extensions
AddHandler isapi-handler .dll
#ISAPICacheFile C:/xampp/isapi-root/isapi_.dll
</IfModule>

<IfModule mod_alias.c>
# This allows ISAPI dll's and CGI exe's (both are required for regular aliases)
AddHandler isapi-handler .dll
AddHandler cgi-script .exe

Alias /isapi "C:/xampp/isapi-root"

<Directory "C:/xampp/isapi-root">
Options ExecCGI
</Directory>
</IfModule>

httpd-vhosts.conf:

<VirtualHost *:80>
ServerName isapi.localhost
DocumentRoot "C:/xampp/isapi-root"
ErrorLog "logs/isapi.localhost-error.log"
CustomLog "logs/isapi.localhost-access.log" combined

<Directory "C:/xampp/isapi-root">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

 hosts (unter Windows 7 C:\Windows\System32\drivers\etc):

127.0.0.1         isapi.localhost