You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by John Hosie <ap...@live.com> on 2008/08/08 15:34:13 UTC

Want to get started...what do I need?

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.
 
Any help pointing me in the right direction would be great.
_________________________________________________________________
Get more from your digital life.  Find out how.
http://www.windowslive.com/default.html?ocid=TXT_TAGLM_WL_Home2_082008

Re: Want to get started...what do I need?

Posted by Ray Morris <su...@bettercgi.com>.
   There are some sample modules included 
with Apache to give you the basic structure.
Definitely see the documentation for "apxs", 
the Apache build tool, if you're not familiar 
with  it.  For comprehensive documentation 
taking you from no module experience to a 
good working understanding of Apache module 
development I found "The Apache Modules Book" 
by Nick Kew to be extremely helpful.
--
Ray B. Morris
support@bettercgi.com

Strongbox - The next generation in site security:
http://www.bettercgi.com/strongbox/



On 08/08/2008 08:34:13 AM, John Hosie 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.
>  
> Any help pointing me in the right direction would be great.
> _________________________________________________________________
> Get more from your digital life.  Find out how.
> http://www.windowslive.com/default.html?
> ocid=TXT_TAGLM_WL_Home2_082008



Re: Want to get started...what do I need?

Posted by Eric Covener <co...@gmail.com>.
On Fri, Aug 8, 2008 at 9:34 AM, John Hosie <ap...@live.com> wrote:
> 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,

You'd probably have a much better time running a recent Fedora or
Centos during development.

-- 
Eric Covener
covener@gmail.com

Re: Want to get started...what do I need?

Posted by Sorin Manolache <so...@gmail.com>.
On Fri, Aug 8, 2008 at 15:34, John Hosie <ap...@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