Trying to install the apache2 .so file in Linux using a WHM/Cpanel hosted server

I am trying to deploy the hello world sample server project from your documentation. We purchased the .BIZ modules and are trying to create a html form server to capture html form data.

We are using a CentOs Linux server and PAServer to deploy the Delphi project. All of that is working.

Is there any way to do this without using an Apache .so? It turns out CentOs on Linux does not allow for custom .so apache modules if using WHM/Cpanel. How can a REST server be created on Linux distros but work regardless?

First, I do not understand the following line:

Server.Dispatcher.AddModule(TAnonymousServerModule.Create( 'http://localhost/tms/hello', procedure(const C: THttpServerContext)

Specifically, the URL. I get localhost, but why the /tms/hello? Is this a dynamic webpage? What does this link do?

Second, there is no modules-available directory on our CentOs Linux server, so where do I create the .conf and .load files?

Third, I added these lines of code to grab the html form data and display it:

ContentAsUTF8String := TEncoding.UTF8.GetString(C.Request.Content); // Display the results of the form data


How do I send form data to this server so that those lines work? I did declare ContentAsUTF8String as a UTF8String.

I just need a bit of guidance to get the apache module to work. We are using RAD Studio 10.4 Sydney Delphi Architect.

Thank you.


i know the question sees a bit convoluted. I need to figure out a way to create a REST server but not using a custom apache .so module. It needs to run on any apache Linux server and wait for input from a form using POST. What is the best way to do this with your BIZ product?

One version I noticed is Indy-based Server. It is toted as a stand alone server that can run on Linux. Are there any demos of a Indy-based Server available other than just the docs?

Hi Steven,

The host can be ignored, it's just to build a well formed URL. The /tms/hello is needed because that's the way the module knows the root URL of your module. For example, if a request comes at path /tms/hello/myendpoint, it will know that it should strip the initial path and consider only my endpoint.

Sorry, but I don't understand this question. Are you asking about how to build your web application?

I don't have much experience with CentOS, but Apache should be the same no matter what the Linux distribution. It's even the same in Windows. Maybe the files are in a different directory? Have you checked the Apache documentation for your CentOS Linux? Ar you the one managing the CentOS Linux?

The one available in the documentation is what we have. But that's just it for Sparkle. You can then run the server as a console application, or make it a daemon to run like it's a "service". Here is a tutorial: Building a (real) Linux daemon with Delphi - Part 1