httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sorin Manolache" <sor...@gmail.com>
Subject Re: Want to get started...what do I need?
Date Fri, 08 Aug 2008 14:13:55 GMT
On Fri, Aug 8, 2008 at 15:34, John Hosie <apache.brave@live.com> wrote:
> I'm new to this list. I've got lots of background in Unix and C and a fair background
in web-based development. But I haven't really done any Apache modules before. I've got a
task of taking old application written in Server Side JavaScript (SSJS) running on a NetScape
4.x server on HP-UX, and making it run in C on an Apache server. The SSJS has been converted
already to C/C++ using NSAPI. This runs both on Linux and HP-UX. But because we're targeting
Linux servers, the target web server OS will be Linux - Red Hat Enterprise 5 Advanced Server.
Current development environment I have to work with is Cygwin. There is also a Linux server
I have access to for now, which I am assuming is different from the development server we're
expecting in a couple of weeks. "uname -r" yields:
> 2.6.9-55.0.2.ELsmp
> That all said, I need to know what I need to get started. Cygwin packaging to start with
would be nice. Sample base module code would be great.
>
> I also will need to know what packages will need to be put on the Red Hat development
environment.

I don't know about RedHat. Here's the list of packages I have on
debian. I think you can figure out which are the names on RedHat.

apache2-mpm-worker
apache2-threaded-dev
apache2-utils
apache2.2-common
libapache2-mod-apreq2
libapache2-mod-perl2
libapr1
libapr1-dev
libapreq2
libapreq2-dev
libaprutil1
libaprutil1-dev

Mainly you'll need the development headers in /usr/include/apache2 and
/usr/include/apr-1.0

You'll need the executables apxs2, apr-1-config (or apr-config),
apu-1-config (or apu-config).

I recommend that you take the sources of apache2 and compile them with
no optimisation and all debug symbols (-O0 -ggdb3 -fno-inline etc),
with all modules. Whenever you'll get in trouble, you can install your
modules in the apache with the debug symbols and you can debug it (run
apache2 with the switch -X).

Spend some time studying the sources of apache2 in order to detect the
hook points. Hooks are executed by functions starting with ap_run.
Grep for ap_run over apache's sources.

Regards,
Sorin

Mime
View raw message