It sounds like you want to write a pair of filters. There are several examples of writing them in C, and a more detailed tutorial with background at the mod_perl website http://perl.apache.org/docs/2.0/user/handlers/filters.html
Erica Zhang wrote: > Hi, > Thanks. > > Well, my idea is want to analyze all requests from client before they > arrives to the user applications and also analyze all responsed html > after they are created by server applications and before they are > arrived at client. > > To solve this problem, originally, I want to set up two ports. One port > for the user applications and the other is for my tool. My tool will > communicate with the user applications through Apache HTTP Server. > However, now, I do not think it is a good idea. > > Now I am considering to develop a simple tool to solve this problem like > Apache HTTP Server to catch the request and response. But I am not still > sure about if this is a good idea, because I am not familiar with web > application development . > > What is your idea ? > > Thanks, > > Erica > > Joshua Slive wrote: > >> On 2/26/07, Erica Zhang <[EMAIL PROTECTED]> wrote: >> >>> Hi, >>> >>> I am developing some component, which need Apache to be able to listen >>> to two ports, instead of only one default port. I do not know if there >>> is some way to configure Apache http server to work in this way. I do >>> not want to configure it to be virtual host. >> >> >> Listen 80 >> Listen 81 >> in httpd.conf should do the trick. >> >> Or if not, you need to better specify what you are trying to do. >> >> Joshua. >