Add new modules to httpd and add modules to httpd

Source: Internet
Author: User

Add new modules to httpd and add modules to httpd

Sometimes, due to special requirements, you need to add some additional modules to the installed httpd. In this case, you need to use the apxs tool in httpd-devel. To use this extension mechanism, your platform must support the DSO feature, that is, Apache httpd must have a built-in mod_so module.

The method for adding modules to apxs is simple. The following are some options that may be used.

-c mod_foo.c: Compile the c file into a. so file.
-i: Install one or more modules in the modules directory of the apache service directory.
-a: Indicates that the LoadModule line is automatically added to httpd. conf.
-A: Indicates that the # LoadModule line is automatically added to httpd. conf, that is, the module is installed but not enabled.
-n: Explicitly specify the name of the module to be installed by-I.

For example, add the mod_proxy.so module.

Cd httpd-2.4.23/modules # enter the decompressed directory of httpd source code apxs-c-I-A proxy/mod_proxy.c proxy/proxy_util.c

The last few lines after successful installation tell you to modify the configuration file to see if you want to modify the LoadModule command to load the module.

Sometimes, after a module is added, the system fails to restart and prompts undefined Symbol. This indicates that another required module needs to be added.

For example, if you only installapxs -c -i -a proxy/mod_proxy.cRestart httpd.

Starting httpd: httpd: Syntax error on line 117 of /etc/apache/httpd.conf: Cannot load modules/mod_proxy.so into server: /usr/local/apache/modules/mod_proxy.so: undefined symbol: ap_proxy_strmatch_domain

This indicates that the related devel or util modules need to be installed.

 

Back to Linux series article outline: http://www.cnblogs.com/f-ck-need-u/p/7048359.html
Back to website architecture series article outline: http://www.cnblogs.com/f-ck-need-u/p/7576137.html
Back to database series article outline: http://www.cnblogs.com/f-ck-need-u/p/7586194.html
Reprinted please indicate the source: http://www.cnblogs.com/f-ck-need-u/p/8413455.html

Note: If you think this article is not bad, please click the recommendation in the lower right corner. Your support can stimulate the author's enthusiasm for writing. Thank you very much!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.