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.c
Restart 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!