You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jimmy McDonald <io...@bsdshell.dyndns.org> on 2003/04/30 19:53:05 UTC

[users@httpd] mod_ext_filter question

>From the docs it explains the following, which is exactly
what I want to do:

-------------------[Begin Doc Snippet]-----------------
# mod_ext_filter directive to define a filter which
# replaces text in the response
#
ExtFilterDefine fixtext mode=output intype=text/html \

cmd="/bin/sed s/verdana/arial/g"


<Location />

# core directive to cause the fixtext filter to
# be run on output
SetOutputFilter fixtext

</Location>

-------------------[End Doc Snippet]--------------------

If I wanted to add another change should I do it something like this:

ExtFilterDefine fixtext2 mode=output intype=text/html \

cmd="/bin/sed s/times/palatino/g"

(Just using fonts to keep with the original example)
and then in my <Location> put:


SetOutputFilter fixtext, fixtext2

or

SetOutputFilter fixtext
SetOutputFilter fixtext2

???

Thanks
Jimmy

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_ext_filter question

Posted by Jimmy McDonald <io...@bsdshell.dyndns.org>.
This server has never had 1.3 on it.
I will look at the docs mentioned in the other message
and can run it by Covalent as well.

Thanks for all the input from everyone.

Jimmy


On Wed, 30 Apr 2003, [ISO-8859-1] André Malo wrote:

> * Jimmy McDonald wrote:
>
> > Well, I didn't know that was how to make a module from
> > source code since I had never done so before but when trying it
> > this was my output:
> >
> > $ /usr/apache/bin/apxs -c mod_ext_filter.c -o mod_ext_filter.so
> > cc -DEAPI -DMOD_PERL -DUSE_EXPAT -O -G -Kpic -I/usr/apache/include  -c
>
> erm, EAPI is totally useless for apache 2.0 (though I don't know covalent's
> patches ...).
> Do you have an 1.3 still installed? If so, you have to use the appropriate
> apxs version (the 2.0 one).
>
> nd
> --
> > [...] weiß jemand zufällig, was der Tag DIV ausgeschrieben bedeutet?
> DIVerses. Benannt nach all dem unstrukturierten Zeug, was die Leute da
> so reinpacken und dann absolut positionieren ...
>                            -- Florian Hartig und Lars Kasper in dciwam
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_ext_filter question

Posted by André Malo <nd...@perlig.de>.
* Jimmy McDonald wrote:

> Well, I didn't know that was how to make a module from
> source code since I had never done so before but when trying it
> this was my output:
> 
> $ /usr/apache/bin/apxs -c mod_ext_filter.c -o mod_ext_filter.so
> cc -DEAPI -DMOD_PERL -DUSE_EXPAT -O -G -Kpic -I/usr/apache/include  -c

erm, EAPI is totally useless for apache 2.0 (though I don't know covalent's
patches ...).
Do you have an 1.3 still installed? If so, you have to use the appropriate
apxs version (the 2.0 one).

nd
-- 
> [...] weiß jemand zufällig, was der Tag DIV ausgeschrieben bedeutet?
DIVerses. Benannt nach all dem unstrukturierten Zeug, was die Leute da
so reinpacken und dann absolut positionieren ...
                           -- Florian Hartig und Lars Kasper in dciwam

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_ext_filter question

Posted by George Schlossnagle <ge...@omniti.com>.
Google search on that turned up:

http://www.faqts.com/knowledge_base/view.phtml/aid/11449/fid/1

Maybe those things are affecting you?  I imagine at this point Covalent 
tech support might be of help to you.  I don't know if they do anything 
funky with their apxs.

On Wednesday, April 30, 2003, at 03:48  PM, Jimmy McDonald wrote:

> apxs:Break: Command failed with rc=255


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_ext_filter question

Posted by Jimmy McDonald <io...@bsdshell.dyndns.org>.
Well, I didn't know that was how to make a module from
source code since I had never done so before but when trying it
this was my output:

$ /usr/apache/bin/apxs -c mod_ext_filter.c -o mod_ext_filter.so
cc -DEAPI -DMOD_PERL -DUSE_EXPAT -O -G -Kpic -I/usr/apache/include  -c
mod_ext_filter.c
apxs:Break: Command failed with rc=255

Jimmy


On Wed, 30 Apr 2003, George Schlossnagle wrote:

>
> On Wednesday, April 30, 2003, at 03:34  PM, Jimmy McDonald wrote:
> > So, Covalent comes with a bunch of modules available
> > but mod_ext_filter is not one of them and the only way
> > I can implement it is to get mod_ext_filter.so or
> > to compile it somehow.
>
>
> apxs -c mod_ext_filter.c -o mod_ext_filter.so doesn't work for you?
>
> George
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_ext_filter question

Posted by George Schlossnagle <ge...@omniti.com>.
On Wednesday, April 30, 2003, at 03:34  PM, Jimmy McDonald wrote:
> So, Covalent comes with a bunch of modules available
> but mod_ext_filter is not one of them and the only way
> I can implement it is to get mod_ext_filter.so or
> to compile it somehow.


apxs -c mod_ext_filter.c -o mod_ext_filter.so doesn't work for you?

George


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_ext_filter question

Posted by Jimmy McDonald <io...@bsdshell.dyndns.org>.
I can't do that.
I don't have an open source version of apache.
My company does not allow open source applications
to be used for production. I convinced them to purchase
apache through www.covalent.net

The open source piece as availabe is not the problem in
as much as the company requires that all applications have
vendor support and that the applications are certified by
the vendor to work with other applications.

Covalent distibutes a compiled version of the
application with DSO support enabled. They also
have a lot of custom modules that replace the
standard open source modules.

So, Covalent comes with a bunch of modules available
but mod_ext_filter is not one of them and the only way
I can implement it is to get mod_ext_filter.so or
to compile it somehow.

Jimmy


On Wed, 30 Apr 2003, Joshua Slive wrote:

>
> On Wed, 30 Apr 2003, Jimmy McDonald wrote:
> > Now my question is how to I compile the mod_ext_filter.c
> > into the .so?
>
> The easiest way is to go back and recompile the whole server and add that
> module.  See:
> http://httpd.apache.org/docs-2.0/install.html#configure
>
> Just throw in an --enable-ext_filter when you configure.
>
> Joshua.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_ext_filter question

Posted by Joshua Slive <jo...@slive.ca>.
On Wed, 30 Apr 2003, Jimmy McDonald wrote:
> Now my question is how to I compile the mod_ext_filter.c
> into the .so?

The easiest way is to go back and recompile the whole server and add that
module.  See:
http://httpd.apache.org/docs-2.0/install.html#configure

Just throw in an --enable-ext_filter when you configure.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_ext_filter question

Posted by Jimmy McDonald <io...@bsdshell.dyndns.org>.
Thanks,

I did notice that the ; was used to delimit arguments
on the SetOutputFilter line elsewhere but wanted to double
check.

As far as performance goes, this is a low traffic Sun Fire 280-R
with dual 750MHz and a GB of RAM which isn't near the top of
SUNS product lines but certainly will provide plenty of power.

Now my question is how to I compile the mod_ext_filter.c
into the .so?





On Wed, 30 Apr 2003, Joshua Slive wrote:

>
> On Wed, 30 Apr 2003, Jimmy McDonald wrote:
> > If I wanted to add another change should I do it something like this:
>
> > SetOutputFilter fixtext, fixtext2
>
> It's actually
> SetOutputFilter fixtext;fixtext2
>
> This is documented here:
> http://httpd.apache.org/docs-2.0/mod/core.html#setoutputfilter
> Although there aren't any examples with multiple filters, so you need to
> decipher the "syntax" line.
>
> A couple notes:
>
> 1. As I mentioned before, mod_ext_filter will significantly slow the
> server.  If you can afford that, there is no problem.
>
> 2. You should try to combine your filters into one if at all possible, in
> order to minimize the forking that apache will need to do on each request.
>
> Joshua.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_ext_filter question

Posted by Joshua Slive <jo...@slive.ca>.
On Wed, 30 Apr 2003, Jimmy McDonald wrote:
> If I wanted to add another change should I do it something like this:

> SetOutputFilter fixtext, fixtext2

It's actually
SetOutputFilter fixtext;fixtext2

This is documented here:
http://httpd.apache.org/docs-2.0/mod/core.html#setoutputfilter
Although there aren't any examples with multiple filters, so you need to
decipher the "syntax" line.

A couple notes:

1. As I mentioned before, mod_ext_filter will significantly slow the
server.  If you can afford that, there is no problem.

2. You should try to combine your filters into one if at all possible, in
order to minimize the forking that apache will need to do on each request.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org