Il 16/05/2011 17.25, Mark Montague ha scritto:
Please don't reply privately (off-list); it deprives other people
(both now and in the future) from the benefits of the discussion.
On May 16, 2011 11:05 , marco <marcodisano@xxxxxxxxx> wrote:
I have a LAMP architecure and I want that
when an http request must be served, then the apache server
(before the request is served) send a signal to a different
process (that doesn't belong to apache, for example a process
called X). Only after the X process run, Apache can serve the
request.
So the temporal sequence are:
----->httprequest---->Apache--->Xprocess--->Apache
I have seen that http_request.c file manage this situation; for
this I want to modify this file.
Can you believe that this problem can be solved without modify
http_request.c file?
Yes: I believe you could write a module to do this. (I'd have to
do research to be able to say exactly how, though). The advantage
to doing this in a module, instead of modifying httpd itself, is
lower maintenance costs when future versions of Apache HTTP Server
are released, quicker upgrades, and less confusion of other people
(system administrators, webmasters) who have to work with your
site or server. For more information, seek help on the Apache
HTTP Server third-party module development mailing list.
If you'd like to do this without having to write a full Apache
module in C, take a look at mod_perl:
http://perl.apache.org/docs/2.0/user/handlers/intro.html This
will allow you to tie into the Apache request processing loop from
a Perl script, rather than from a compiled module. For more
information, seek help on the mod_perl users' mailing list.
But, are you sure that you need to signal a different process, and
that what process X does is not something that can be done through
Apache, or via another mechanism or architecture?
--
Mark Montague
mark@xxxxxxxxxxx
As you told me, I have read how to use mod_perl. For my goal, as I
expalin you in the previous mail, I can use mod perl to create an
handler that will be executed corresponding
to any phase of httpRequest.
For example, the PerlPostRequestHandler is executed
after the apache server receives the http request and it did its
parsing. So, in this way, when this handler is invoked I can do in
it all the things I want. But I ask you if this handler is executed
in parallel or it is executed in a sequential mode?
Do you think am I on the right?Have you never work with these
handler?
Thanks
|