[clue] [Tech] Apache apxs

Mike Staver staver at fimble.com
Mon Mar 14 15:47:39 MDT 2011


Yep, that's why I skipped CentOS 5 all together so far :) I keep telling
myself that when CentOS 6 is released, I'm putting together some new
hardware and going for it.

Ok, so I feel dumb. The command I was running didn't work:

[root at server ~]# /home/httpd/bin/apxs -c -I /usr/include/libxml2/ -I . -i
mod_proxy_html.c

As usual, I realized that I was doing it wrong. Intead of using the apxs
binary in httpd/bin, I ran:

[root at server ~]# apxs -c -I /usr/include/libxml2/ -I . -i mod_proxy_html.c

That calls: /usr/sbin/apxs. Success! Now the module lives in:

/usr/lib/httpd/modules/mod_proxy_html.so

And the world is right once again.

> Yeah. It gets to be a bit of a pain to integrate new stuff when the
> box you are working on starts carrying such a load.   And by then it's
> too late to work out a better way of managing the complexity.   About
> the only path to follow is to make a second system and start
> populating it to be a replacement for the current primary.
>
> On Mon, Mar 14, 2011 at 3:29 PM, Mike Staver <staver at fimble.com> wrote:
>> I agree compiling Apache isn't that big of a deal, but I currently have
>> this machine wearing many different hats:
>>
>> 1) Mail server.
>> 2) Standard Apache box with multiple apache vhosts.
>> 3) Subversion box, via Apache of course.
>> 4) Bind server.
>> 5) Samba LAN file server.
>>
>> Upgrading this machine will take some careful planning :) I currently
>> have
>> the following installed:
>>
>> [root at server ~]# rpm -qa | grep httpd
>> httpd-suexec-2.0.52-47.ent.centos4
>> httpd-2.0.52-47.ent.centos4
>> httpd-devel-2.0.52-47.ent.centos4
>> system-config-httpd-1.3.1-1
>> httpd-manual-2.0.52-47.ent.centos4
>>
>> I'm bummed that I can't figure out a way around this without
>> recompiling,
>> because having updated versions of software delivered automagically with
>> update commands is much easier than compiling an update everytime Apache
>> puts one out, which is more often than I would like to worry about it.
>>
>>> Your distro probably has the DSO support and perhaps a -dev version of
>>> the package available.   As an aside, if this system is just the proxy
>>> then it might be simpler to use an os that has the mod you want.
>>>
>>> And it's not that big a deal to build and compile Apache yourself.
>>> Once you have decided to deploy one kind of built from source package
>>> the second is not nearly as hard as the first one was.
>>>
>>> On Mon, Mar 14, 2011 at 2:55 PM, Mike Staver <staver at fimble.com> wrote:
>>>> I'm trying to set up a reverse proxy server, and I've found that some
>>>> of
>>>> the URLs we run through it use static vs relative links to things like
>>>> images and videos. Thankfully, there is a cool new apache module
>>>> called
>>>> mod_proxy_html which scans the HTML source and can replace various
>>>> strings
>>>> for you. The config is easy enough and looks cool. The problem is that
>>>> I'm
>>>> on CentOS 4 still, and this module is not built in. So, I downloaded
>>>> it
>>>> and tried to compile it in:
>>>>
>>>> [root at server ~]# wget
>>>> http://apache.webthing.com/mod_proxy_html/mod_proxy_html.zip
>>>> --14:38:02--
>>>>  http://apache.webthing.com/mod_proxy_html/mod_proxy_html.zip
>>>>           => `mod_proxy_html.zip'
>>>> Resolving apache.webthing.com... 209.20.83.52
>>>> Connecting to apache.webthing.com|209.20.83.52|:80... connected.
>>>> HTTP request sent, awaiting response... 200 OK
>>>> Length: 27,934 (27K) [application/zip]
>>>>
>>>> 100%[================================================================>]
>>>> 27,934       120.53K/s
>>>>
>>>> 14:38:03 (120.13 KB/s) - `mod_proxy_html.zip' saved [27934/27934]
>>>>
>>>> [root at server ~]# unzip mod_proxy_html.zip
>>>> Archive:  mod_proxy_html.zip
>>>>   creating: mod_proxy_html/
>>>>  inflating: mod_proxy_html/mod_xml2enc.c
>>>>  inflating: mod_proxy_html/README
>>>>  inflating: mod_proxy_html/proxy_html.conf
>>>>  inflating: mod_proxy_html/mod_proxy_html.c
>>>>  inflating: mod_proxy_html/mod_xml2enc.h
>>>>  inflating: mod_proxy_html/COPYING
>>>> [root at server ~]# /home/httpd/bin/apxs -c -I /usr/include/libxml2/ -I .
>>>> -i
>>>> mod_proxy_html.c
>>>> apxs:Error: Sorry, no DSO support for Apache available
>>>> apxs:Error: under your platform. Make sure the Apache
>>>> apxs:Error: module mod_so is compiled into your server
>>>> apxs:Error: binary `/home/httpd/bin/httpd'.
>>>>
>>>> Doh. My stock version of apache has no DSO support. Besides compiling
>>>> Apache from scratch myself on this machine, what are my options to
>>>> enable
>>>> mod-so on this bad boy?
>>>> _______________________________________________
>>>> clue mailing list
>>>> clue at cluedenver.org
>>>> http://cluedenver.org/mailman/listinfo/clue
>>>>
>>>
>>
>> _______________________________________________
>> clue mailing list
>> clue at cluedenver.org
>> http://cluedenver.org/mailman/listinfo/clue
>>
>



More information about the clue mailing list