0

I crated a Delphi standalone DataSnap WebBroker application and a loadable apache module named mod_webbroker.dll.
They share the same units.
The call to the stand alone DataSnap WebBroker succeeded but the call to the apache module failed with no response result.
This is the call to the stand alone exe:
URL: http://localhost:8080/datasnap/rest/TServerMethods1/%22ReverseString%22
Method: post
Content-Type: application /json
Custom body: 123

I tried calling the apache module in 2 ways. Both didn't get a respond:
http://localhost:8080/datasnap/rest/TServerMethods1/%22ReverseString%22
http://localhost:8080/webbroker_module/datasnap/rest/TServerMethods1/%22ReverseString%22

My httpd.conf changes:

Define SRVROOT "d:/Apache24_32"    
LoadModule webbroker_module modules/mod_webbroker.dll    
<Location /webbroker>    
    SetHandler mod_webbroker-handler            
</Location>        
ServerName localhost:80    

Are there errors in the way I call the apache module method or in my httpd.conf changes?
I use Delphi 10.3 RIO and Apache 2.4 32 bit for Windows on a Windows 10 PC.
Thanks in advance.

Lior I
  • 47
  • 1
  • 8
  • What response DID you get from the Apache web server? You can't say you didn't get a response from the Apache web server. It would have said something. – Freddie Bell Aug 30 '21 at 05:27
  • The response was: "The requested URL can't be reached. The service might be temporarily down or it may have moved permanently to a new web address. connect ECONNREFUSED 127.0.0.1:8080" – Lior I Aug 30 '21 at 07:10
  • Apache runs on port 80, not 8080. Also the `Location` directive indicates that the path is `/webbroker`. So try `http://localhost/webbroker/...` instead. – Olivier Aug 30 '21 at 07:38

1 Answers1

0

Thank you Olivier. Problem solved. Path should be:
http://localhost/webbroker/datasnap/rest/TServerMethods1/%22ReverseString%22

Lior I
  • 47
  • 1
  • 8
  • Please provide additional details in your answer. As it's currently written, it's hard to understand your solution. – Community Aug 31 '21 at 10:47
  • My original call to the ReveresString method was wrong. I wrote .../webbroker_module/... The correct call is .../webbroker/... – Lior I Sep 01 '21 at 11:58