You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Marcos Mendez <ma...@gmail.com> on 2009/10/19 17:52:52 UTC

[users@httpd] is mod_ext_filter supposed to work with mod_proxy?

Does anyone know if ext_filter should work when using apache as a
proxy? I'm trying to add some content to the html body of content
served by the proxy, but it doesn't seem to be working. Has anyone
tried this? I think that my configuration is correct, at least for the
locally hosted website because i see the additional content. Any help
would be greatly appreciated.

Configuration:
Apache/2.2.11
Ubuntu/2.6.28-11-server

Regards,

Marcos

---------------------------------------------------------------------
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] is mod_ext_filter supposed to work with mod_proxy?

Posted by Marcos Mendez <ma...@gmail.com>.
Hi,

I had to create two filters, one for text/html and one for text/plain
and use SetOutputFilter for both. :)

Thanks!


On Mon, Oct 19, 2009 at 6:14 PM, Marcos Mendez <ma...@gmail.com> wrote:
> Hi Eric,
>
> Sorry. I mispoke. The filter is working, but it seems to be ignoring
> the html content. I'm using intype=text/html.
>
> Regards,
>
> Marcos
>
> On Mon, Oct 19, 2009 at 5:54 PM, Marcos Mendez <ma...@gmail.com> wrote:
>> Hi Eric,
>>
>> I did a full stop and start of apache instead of restart. It works! Thanks!
>>
>> On Mon, Oct 19, 2009 at 12:47 PM, Eric Covener <co...@gmail.com> wrote:
>>> On Mon, Oct 19, 2009 at 12:39 PM, Marcos Mendez <ma...@gmail.com> wrote:
>>>> Hi Eric, thanks for the quick response. So then I must be doing
>>>> something wrong. Does this look right? I'm testing a simple filter
>>>> that rewrites some text. Through the proxy, this html
>>>> (http://skyblender.com/index.html) should show two "arial" instead of
>>>> just one.
>>>>
>>>> --- proxy.conf ----
>>>>
>>>> ExtFilterDefine my-filter mode=output intype=text/html cmd="/bin/sed
>>>> s/verdana/arial/g"
>>>>
>>>> <IfModule mod_proxy.c>
>>>>       ProxyRequests On
>>>>       <Proxy *>
>>>>               AddDefaultCharset off
>>>>               Order allow,deny
>>>>               Allow from all
>>>>               SetOutputFilter my-filter
>>>>       </Proxy>
>>>>       ProxyVia Off
>>>> </IfModule>
>>>
>>> No time to play with it here, but can you confirm that
>>> SetOutputFilter works in a Proxy block?    You can also turn on extra
>>> extfilter debugging.
>>>
>>>
>>> --
>>> Eric Covener
>>> covener@gmail.com
>>>
>>> ---------------------------------------------------------------------
>>> 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] is mod_ext_filter supposed to work with mod_proxy?

Posted by Marcos Mendez <ma...@gmail.com>.
Hi Eric,

Sorry. I mispoke. The filter is working, but it seems to be ignoring
the html content. I'm using intype=text/html.

Regards,

Marcos

On Mon, Oct 19, 2009 at 5:54 PM, Marcos Mendez <ma...@gmail.com> wrote:
> Hi Eric,
>
> I did a full stop and start of apache instead of restart. It works! Thanks!
>
> On Mon, Oct 19, 2009 at 12:47 PM, Eric Covener <co...@gmail.com> wrote:
>> On Mon, Oct 19, 2009 at 12:39 PM, Marcos Mendez <ma...@gmail.com> wrote:
>>> Hi Eric, thanks for the quick response. So then I must be doing
>>> something wrong. Does this look right? I'm testing a simple filter
>>> that rewrites some text. Through the proxy, this html
>>> (http://skyblender.com/index.html) should show two "arial" instead of
>>> just one.
>>>
>>> --- proxy.conf ----
>>>
>>> ExtFilterDefine my-filter mode=output intype=text/html cmd="/bin/sed
>>> s/verdana/arial/g"
>>>
>>> <IfModule mod_proxy.c>
>>>       ProxyRequests On
>>>       <Proxy *>
>>>               AddDefaultCharset off
>>>               Order allow,deny
>>>               Allow from all
>>>               SetOutputFilter my-filter
>>>       </Proxy>
>>>       ProxyVia Off
>>> </IfModule>
>>
>> No time to play with it here, but can you confirm that
>> SetOutputFilter works in a Proxy block?    You can also turn on extra
>> extfilter debugging.
>>
>>
>> --
>> Eric Covener
>> covener@gmail.com
>>
>> ---------------------------------------------------------------------
>> 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] is mod_ext_filter supposed to work with mod_proxy?

Posted by Marcos Mendez <ma...@gmail.com>.
Hi Eric,

I did a full stop and start of apache instead of restart. It works! Thanks!

On Mon, Oct 19, 2009 at 12:47 PM, Eric Covener <co...@gmail.com> wrote:
> On Mon, Oct 19, 2009 at 12:39 PM, Marcos Mendez <ma...@gmail.com> wrote:
>> Hi Eric, thanks for the quick response. So then I must be doing
>> something wrong. Does this look right? I'm testing a simple filter
>> that rewrites some text. Through the proxy, this html
>> (http://skyblender.com/index.html) should show two "arial" instead of
>> just one.
>>
>> --- proxy.conf ----
>>
>> ExtFilterDefine my-filter mode=output intype=text/html cmd="/bin/sed
>> s/verdana/arial/g"
>>
>> <IfModule mod_proxy.c>
>>       ProxyRequests On
>>       <Proxy *>
>>               AddDefaultCharset off
>>               Order allow,deny
>>               Allow from all
>>               SetOutputFilter my-filter
>>       </Proxy>
>>       ProxyVia Off
>> </IfModule>
>
> No time to play with it here, but can you confirm that
> SetOutputFilter works in a Proxy block?    You can also turn on extra
> extfilter debugging.
>
>
> --
> Eric Covener
> covener@gmail.com
>
> ---------------------------------------------------------------------
> 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] is mod_ext_filter supposed to work with mod_proxy?

Posted by Eric Covener <co...@gmail.com>.
On Mon, Oct 19, 2009 at 12:39 PM, Marcos Mendez <ma...@gmail.com> wrote:
> Hi Eric, thanks for the quick response. So then I must be doing
> something wrong. Does this look right? I'm testing a simple filter
> that rewrites some text. Through the proxy, this html
> (http://skyblender.com/index.html) should show two "arial" instead of
> just one.
>
> --- proxy.conf ----
>
> ExtFilterDefine my-filter mode=output intype=text/html cmd="/bin/sed
> s/verdana/arial/g"
>
> <IfModule mod_proxy.c>
>       ProxyRequests On
>       <Proxy *>
>               AddDefaultCharset off
>               Order allow,deny
>               Allow from all
>               SetOutputFilter my-filter
>       </Proxy>
>       ProxyVia Off
> </IfModule>

No time to play with it here, but can you confirm that
SetOutputFilter works in a Proxy block?    You can also turn on extra
extfilter debugging.


-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
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] is mod_ext_filter supposed to work with mod_proxy?

Posted by Marcos Mendez <ma...@gmail.com>.
Hi Eric, thanks for the quick response. So then I must be doing
something wrong. Does this look right? I'm testing a simple filter
that rewrites some text. Through the proxy, this html
(http://skyblender.com/index.html) should show two "arial" instead of
just one.

--- proxy.conf ----

ExtFilterDefine my-filter mode=output intype=text/html cmd="/bin/sed
s/verdana/arial/g"

<IfModule mod_proxy.c>
       ProxyRequests On
       <Proxy *>
               AddDefaultCharset off
               Order allow,deny
               Allow from all
               SetOutputFilter my-filter
       </Proxy>
       ProxyVia Off
</IfModule>


On Mon, Oct 19, 2009 at 12:32 PM, Eric Covener <co...@gmail.com> wrote:
> On Mon, Oct 19, 2009 at 11:52 AM, Marcos Mendez <ma...@gmail.com> wrote:
>> Does anyone know if ext_filter should work when using apache as a
>> proxy? I'm trying to add some content to the html body of content
>> served by the proxy, but it doesn't seem to be working. Has anyone
>> tried this? I think that my configuration is correct, at least for the
>> locally hosted website because i see the additional content. Any help
>> would be greatly appreciated.
>>
>
> They should work fine together.
>
> --
> Eric Covener
> covener@gmail.com
>
> ---------------------------------------------------------------------
> 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] is mod_ext_filter supposed to work with mod_proxy?

Posted by Eric Covener <co...@gmail.com>.
On Mon, Oct 19, 2009 at 11:52 AM, Marcos Mendez <ma...@gmail.com> wrote:
> Does anyone know if ext_filter should work when using apache as a
> proxy? I'm trying to add some content to the html body of content
> served by the proxy, but it doesn't seem to be working. Has anyone
> tried this? I think that my configuration is correct, at least for the
> locally hosted website because i see the additional content. Any help
> would be greatly appreciated.
>

They should work fine together.

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
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