M0NkEY
01-20-2004, 09:16 PM
Hey, I intalled a module using apxs a while ago; the software the module is compiled from has been upgraded and I have installed the latest version. Can anyone tell me the best way to recompile the apache module to replace the old one or a simple way to remove the old module so I can recompile it again?
Is it as simple as renaming the old .so file?
Winkie
01-20-2004, 09:36 PM
if you have compile a new one, copy it into the appropriate directory with a name such as <appname>-<version>.so, rename the old one to a similar standard and symlink the usual name to the appropriate version.
blessen
01-20-2004, 09:39 PM
its simple...just put the latest .so file in the /usr/local/apache/libexec/
To compile apache as DSO..just follo the steps provided in the link..http://www.joot.com/dave/writings/articles/php.html
The below example add php as dso to apache
Download the Apache server (http://httpd.apache.org) and PHP (http://www.php.net).
Create compiling and archive directories:
mkdir -p /usr/local/src/archives
mkdir -p /usr/local/src/extracted
Save the files in the archives location:
/usr/local/src/archives/
Verify the sizes of the files:
4676089 httpd-2.0.40.tar.gz
2758255 php-4.2.3.tar.bz2
Change directory and extract the archives:
cd /usr/local/src/extracted
tar zxf ../archives/httpd-2.0.40.tar.gz
tar jxf ../archives/php-4.2.3.tar.bz2
Configure and install Apache (must be done before PHP is configured):
cd /usr/local/src/extracted/httpd-2.0.40
./configure --prefix=/usr/local/apache --enable-module=so
make
make install
Configure and install an Apache-aware PHP:
cd /usr/local/src/extracted/php-4.2.3
./configure --prefix=/usr/local --with-apxs2=/usr/local/apache/bin/apxs
make
make install
Edit httpd.conf to add a PHP filter after the last AddType declaration:
<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
Start Apache:
cd /usr/local/apache/bin
./apachectl stop
./apachectl start
Copy the following source into a file named index.php in your web files folder and browse to it:
<?
print( "Hello World" )
?>