Web Hosting Talk







View Full Version : mod_gzip Part #2 - mod_so


Eagle
07-22-2001, 09:23 PM
Trying to install mod_gzip on another box (RedHat 7.0)
However, this does not have mod_so installed and I cant install it with apxs

How do I compile this .c file into a .so and into Apache?
Any suggestions?

Thanks

allera
07-22-2001, 10:02 PM
Doesn't apxs come with Apache binaries (when you compile and install it)?

apxs -i -a -c mod_gzip.c

SHOULD work...

http://www.remotecommunications.com/apache/mod_gzip/mod_gzip_faq.htm#q4030

If you don't have apxs, something might be wrong... every time I install Apache apxs comes along for the ride. Maybe it's in my Apache configure string or something... Try to download the mod_gzip.so file from here:

http://www.remotecommunications.com/apache/mod_gzip/src/1.3.19.1a/mod_gzip.so

If that doesn't work... I dunno what to tell ya. I didn't run into any problems compiling and installing it, so I can't be much more help. :(

In case you want more info:

http://www.remotecommunications.com/apache/mod_gzip/

Good luck :)

Eagle
07-22-2001, 10:04 PM
Well it says I cant install mod_gzip because apxs wont allow it since mod_so is not installed....
and there is no way I get mod_so installed with apxs....
keeps saying the same thing :(

and the precompiled mod_gzip gives errors on "httpd -T"

allera
07-22-2001, 10:14 PM
I looked through my httpd.conf. All I find is this:

AddModule mod_so.c

And it's no where to be found on my system. I believe it was a standard module compiled right into Apache. If there are any Apache experts out there, do speak up. :) What I would do is reconfigure Apache that includes the following configure parameter: --enable-module=most. I believe that will compile the mod_so right into Apache for you.

Someone please correct me if I'm wrong. :)

(My previous post made no sense...)

MattF
07-23-2001, 05:49 AM
You can't add to to apache since you don't have mod_so installed. You'll have to recompile Apache again.

download apache-1.3.20.tar.gz to /usr/local/src
you can use 'wget url' form telnet to get it.
gunzip file
tar xvf file.
then run ./configure --prefix=/usr/local/apache --enable-module=so (you might want to check on the syntax there) and this will compile Apache for you with mod_so support.

Slightly off topic but does any know if there is any performance difference between compiling modules directly into the Apache core at compiliation time vs using DSO.

(SH)Saeed
07-23-2001, 06:31 AM
Originally posted by MattF
Slightly off topic but does any know if there is any performance difference between compiling modules directly into the Apache core at compiliation time vs using DSO.

I've heard it should make it a little faster, but the problem is that everytime you want to upgrade the module (i.e. mod_php or mod_perl), you will have to recompile Apache.

Eagle
07-23-2001, 06:53 AM
Originally posted by MattF
then run ./configure --prefix=/usr/local/apache --enable-module=so (you might want to check on the syntax there) and this will compile Apache for you with mod_so support.

I did that, still no luck :(

allera
07-23-2001, 07:39 AM
Post your configure string for us. We'll try to tweak it for you.

Eagle
07-23-2001, 09:28 AM
./configure --prefix=/etc/httpd --enable-module=most

or

./configure --prefix=/etc/httpd --enable-module=so

dont work :(

allera
07-23-2001, 09:44 AM
Do you have the "AddModule mod_so.c" in your httpd.conf? It's quite strange that even with --enable-module=so it doesn't install it for you. :( Did you try to

Eagle
07-23-2001, 10:39 AM
Yup its there :(

Eagle
07-23-2001, 11:14 AM
Ok,

well I finally go that damn apxs to work

but now I get this:

[root@blabla] /etc/httpd/bin/apxs -i -a -c ../mod_gzip.c

gcc -DLINUX=22 -I/perl-mods/php-4.0.5 -I/perl-mods/php-4.0.5/main -I/perl-mods/php-4.0.5/main -I/perl-mods/php-4.0.5/Zend -I/perl-mods/php-4.0.5/Zend -I/perl-mods/php-4.0.5/TSRM -I/perl-mods/php-4.0.5/TSRM -I/perl-mods/php-4.0.5 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/etc/httpd/include -c ../mod_gzip.c
-o ../mod_gzip.so mod_gzip.o
apxs:Break: Command failed with rc=16777215

huck
07-23-2001, 11:56 AM
As I understand it, using DSO is somewhat slower (5%) at run-time than statically compiling modules into apache. Also, there is ~20% during the loading of the module during startup. However, I've never seen hard benchmarks for these numbers. There must be some penalty for using DSO, especially for larger modules, because of certain code will require tricks for relative memory addressing versus absolute.

I have seen newsgroups claims that PHP performance is improved by compiling it into apache vs. the DSO. I know mod_perl works much better compiled into apache than as a mod.

When you compile modules into apache, the httpd binary becomes larger, thus taking up more memory. This means you probably should not compile in options unless they are used frequently. If you make regular use of PHP, mod_perl, or other modules, I would compile them in -- just watch the httpd binary size.