I have created 2 apache dll using delphi and this guide:
https://docwiki.embarcadero.com/RADStudio/Sydney/en/DataSnap_REST_Application_Wizard_for_Windows
then I tried installing the first on apache like this:
LoadModule webbroker_module modules/mod_webbroker.dll
<Location /xyz>
SetHandler mod_webbroker-handler
</Location>
and it works.
When I try to add the second module like this, just below:
LoadModule reportbuilder_module modules/mod_reportbuilder.dll
<Location /rbbin>
SetHandler mod_reportbuilder-handler
</Location>
Alias /rbcache/ "C:/Apache24/htdocs/rbbin/rbcache/"
<Directory "C:/Apache24/htdocs/rbbin/rbcache">
Options All
AllowOverride None
Order allow,deny
Allow from all
</Directory>
I receive an error from apache saying
only one data module per application
What I would like to achieve is that if I go on port 85 it uses module 1 and if I go on port 86 it uses module 2.
How can I do that?
Thank you
2
Answers
It seems like both DataSnap DLLs call a routine which wants to create a TDataModule. The second call fails with the message ‘only one data module per application’.
To verify, you could:
However, I don’t know if it is possible to use two or more DataSnap DLLs in the same Apache process.
One possible workaround which is easy to test:
This will keep the DataSnap DLLs separated, one per process.
For access from the "outside world" (Internet), you may use a reverse proxy so all clients can connect using default HTTP(S) ports.