httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sander Temme <>
Subject Re: questions related to compile!
Date Tue, 06 Feb 2007 21:04:43 GMT

On Feb 6, 2007, at 11:53 AM, 张 臻博 wrote:

> How can i include the source file that i made in the Apache server  
> comiplation process, while the module is still built as a DSO by  
> using apxs

You would have to declare the structure in a header file, which you  
#include in both your module source code and in the Apache source  
file where you reference it. Then, when you configure httpd, you can  
tell it where your header file lives by passing an environment  
variable, like:

CFLAGS="-I/path/to/your/module/source" ./configure ...

It is of course entirely up to you how you design your module and its  
interaction with the core, and we cannot make any assumptions about  
your particular requirements.  However, you must realize that  
modifying the httpd core ties your module completely to that modified  
version of Apache: anyone who wants to use it must patch and  
recompile httpd before they can do so, and repeat this step each time  
they upgrade Apache.

The module API was designed to allow modules a considerable amount of  
flexibility, and provides opportunities to store both long-lived  
configuration data and arbitrary data per request, per connection or  
attached to a memory pool.  The various callback hooks provide  
modules with opportunity to manipulate this data, along with the  
request information, at many points during the handling cycle.  You  
may refer to modules/experimental/mod_example.c in the httpd trunk  
for more information.



PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF

View raw message