LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Please help enable modules after installing apache from source (https://www.linuxquestions.org/questions/linux-newbie-8/please-help-enable-modules-after-installing-apache-from-source-833908/)

chobong 09-22-2010 11:30 PM

Please help enable modules after installing apache from source
 
Dear All,

I installed apache from a source *.tar.gz with default configuration.
Can I enable other modules (like mod_ssl, mod_dav_svn,...) while apache is running?

Please help me,
Thanks and Best Regards

prayag_pjs 09-23-2010 12:19 AM

Install mod_dav_svn
Code:

  sudo yum install mod_dav_svn
Add the LoadModule lines to your httpd:

To edit the httpd.conf:
Code:

    sudo vi /etc/httpd/conf/httpd.conf
Search for the LoadModule lines, and add these to the bottom:
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so

chobong 09-23-2010 12:30 AM

Thanks prayag_pjs, but I installed from a source, not yum or rpm.
I just want to enable module without rebuild apache source ... Can I do this?

prayag_pjs 09-23-2010 12:34 AM

Hi,

See if its installed in your system

Code:

ls -ld /usr/lib/httpd/modules/mod_dav_svn.so
If its listed then;add the LoadModule lines to your httpd

bathory 09-23-2010 04:28 AM

@OP

I guess you mean to install apache modules as DSOs without recompiling apache.
This is in general possible using apxs, if you have used "--enable-so" when you configured apache.
For example if you want to build mod_dav, go into the subdirectory modules/dav/main of the apache sources and run:
Code:

/usr/local/apache2/bin/apxs -i -a -n dav -c mod_dav.c
I've used the default /usr/local/apache2 installation directory. If you have installed apache in some other directory, change the path to apxs accordingly.

Regarding mod_dav_svn is an external module that is provided by subversion. You can get subversion sources, extract the tarball, go into subvsersion-1.x.x/subversion/mod_svn_dav and run:
Code:

/usr/local/apache2/bin/apxs -i -a -I../include -c mod_dav_svn.c
About mod_ssl, IIRC it's possible to be built afterwards as a DSO, but it's a bit tricky

Hope that helps

chobong 10-12-2010 04:33 AM

Thanks a lot, bathory :)

I tried to enable mod_proxy
Code:

/usr/local/apache2/bin/apxs -i -a -n proxy -c mod_proxy.c
/usr/local/apache2/bin/apxs -i -a -n proxy_util -c proxy_util.c
/usr/local/apache2/bin/apxs -i -a -n proxy_http -c mod_proxy_http.c

Compling is ok, but when I restarted apache, it had error
Code:

# /usr/local/apache2/bin/apachectl start
httpd: Syntax error on line 55 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/mod_proxy.so into server: /usr/local/apache2/modules/mod_proxy.so: undefined symbol: ap_proxy_lb_workers


chobong 10-12-2010 05:41 AM

I followed steps and it worked fine
Code:

# apxs -a -i -c mod_proxy.c proxy_util.c
# apxs -a -i -c mod_proxy_ajp.c proxy_util.c ajp_utils.c ajp_header.c ajp_msg.c ajp_link.c
# apxs -a -i -c mod_proxy_balancer.c proxy_util.c
# apachectl configtest
Syntax OK



All times are GMT -5. The time now is 02:02 PM.