Apache Deployment FAQ
In Delphi 7, Apache was an option but it is no longer available. Where did the Apache option go? In later releases Borland (now CodeGear) removed support for Apache so IntraWeb no longer includes support in the wizard. The Apache files are still distributed on the installation media but are unsupported by CodeGear. You can use these to manually create an Apache DSO.
I am deploying on Apache 2 and when I try to run it, I get an error
about "Cannot find ApacheCore.dll".
ApacheCore.dll is an Apache 1 dll. In your project you have left over units
in the uses clause to the <xx> unit. Remove these and rebuild. This is
most often caused by migrating an application from Apache 1 to Apache 2.
Is there a basic example of DSO deployment under Apache
2?
This example will assume the module to deploy is the DSO from the Guess demo,
GuessDSOTwo.dll. Note that Apache 2 is case sensitive.
a) Look for the ServerRoot variable in the configuration file of
Apache, http.conf. The cofiguration file is located in the conf subfolder of the
Apache, so for the typical installation, this would be: C:\Program Files\Apache
Group\Apache2\conf. b) Place your DSO module in one of the subfolders
of the ServerRoot location. Usually, modules are located in the modules
subfolder. For the typical installation, the modules folder is: C:\Program
Files\Apache Group\Apache2\modules. c) configure the webserver to load
the DSO module: - load the DSO at startup. Use the LoadModule
instruction for this opperation in the http.conf file:
LoadModule 'DSO export name' 'path to DSO module relative to
ServerRoot'
'DSO export name' is the identifier defined in the exports clause in
the .dpr. For the Guess demo, this will be GuessDSO_module as per this lines:
exports apache_module name 'GuessDSO_module';
'path to DSO module relative to ServerRoot' would be for the typical
installation modules/GuessDSOTwo.dll
so for the Guess DSO, LoadModule instruction would be:
LoadModule GuessDSO_module modules/GuessDSOTwo.dll
- configure a start URL for the module using the Location
tag:
<Location /GuessDSO> SetHandler
GuessDSOTwo-handler </Location>
The Location parameter is the name under the application can be called from
the browser. In this case, the URL for starting the application will be:
http://ip:apache_port/GuessDSO
The handler for the created application, specified by the SetHandler tag must
be the name of the module without the extension + "-handler".
d) save the http.conf file and restart the Apache 2 server.
Apache 2 does not start after I deployed. I get an error with the new
DSO saying 'Module is not compatible with this version of Apache.'
Apache 2 changed the interfaces after Delphi 7 was released. Please use this
workarround.
|