Jump to content
Sign in to follow this  

Apache (httpd) modules on Linux

Recommended Posts

I'm hoping this post helps future users creating Apache modules for Linux


I'm not really sure why, but it was not possible to do anything time consuming in the '.dpr' section of the project for the Apache module.

I'm not sure if perhaps apache starts the module up first under root then moves it to the user workers later.


In our Windows ISAPI extension we started a startup thread from the DPR before application.run. Under Apache it seems to shutdown the thread started from the main process after a few seconds.

We had to move our INIT code into TWebModule1.WebModuleCreate(Sender: TObject); and use a critical section to ensure it wasn't created multiple times.


Obviously if anyone knows why, feel free to post.


As an example, our startup code connects to a few socket servers to get some startup settings. We could not figure out why the code was getting part way through and just blocking and never receiving the socket response from the working server (after a few seconds/milliseconds) so the first few requests would work then stop. Once the code was moved as above all was fine again.

Edited by hsvandrew

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this