mod_proxy_html was the module I was trying to build, and it turns out
that it requires Apache2.

So I ended up installing Apache2 from the OpenBSD port, as well as
libtools, and libxml.

I then was able to use apxs2 to compile mod_proxy_html.c into the
required .so, and loaded it
into Apache2 with no problem.

Thanks to Cezary Morga for pointing out the blog post

    http://laxmangunjikar.wordpress.com/2008/01/05/installing-mod_proxy_html/?

which helped me to understand the apxs utility, and its use to
simplify creating shared libraries for Apache.

So, for future reference, if you are attempting to compile/load a
module into httpd, use apxs to build the shared library.
If you need Apache2, build that port, and load the libtools package,
and use apxs2 to build your shared lib.

Best regards,

Don

On Mon, Sep 22, 2008 at 4:20 PM, Don Jackson <[EMAIL PROTECTED]> wrote:
> I have some corrections and clarifications I need to make to this query:
>
> 1) The primary module I am trying to use/load is mod_proxy_html, which
> in turn requires mod_proxy_http (among others)
>
> 2) for a while I forgot I needed to turn off the chroot feature, now
> that I have, it looks like the LoadFile of libxml works, eg:
>
>    LoadFile   /usr/local/lib/libxml2.so.9.7
>
> Yields no error messages on startup, so that is a big improvement!
>
> 3) In looking around the source code for httpd, I see that in
>
>      ./src/usr.sbin/httpd/src/modules/proxy
>
> I see that proxy_http.c is in there, so does that mean that
> mod_proxy_http is already included in httpd?
>
> If so, it seems that the only remaining module I would need is mod_proxy_html.
> Do I need to recompile httpd to get this this into the build?  (if so,
> how?) Or can I create a .so and just load it?
>
> Thanks again,
>
> Don
>
>
> On Mon, Sep 22, 2008 at 3:35 PM, Don Jackson <[EMAIL PROTECTED]> wrote:
>> Hello,
>>
>> I'd like to use an Apache module, mod_proxy_http to build a reverse-proxy, 
>> see:
>>
>>   http://www.apachetutor.org/admin/reverseproxies
>>
>> This module requires the inclusion of several others, eg:
>>
>>  LoadModule proxy_module      modules/mod_proxy.so
>>  LoadModule proxy_http_module modules/mod_proxy_http.so
>>  LoadModule headers_module    modules/mod_headers.so
>>  LoadFile   /usr/lib/libxml2.so
>>  LoadModule proxy_html_module modules/mod_proxy_html.so
>>
>> I'm running OpenBSD 4.3 stable on amd64.
>>
>> It looks like the OpenBSD stock httpd inclues mod_proxy and
>> mod_headers, but not mod_proxy_http, or mod_proxy_html, and although
>> libxml2 seems to be available
>> as a package, httpd compains when one tries to "LoadFile" it as above.
>>
>> Despite looking thru the FAQ and a few other places, I'm not finding
>> the documentation I would need to figure out how to add the modules
>> above.
>>
>> Do I need to recompile httpd after adding new modules into the tree?
>>
>> Any advice or pointers to documentation on this would be greatly appreciated!
>>
>> Thanks,
>>
>> Don

Reply via email to