Installing the Apache module with APXS

Source: Internet
Author: User
Tags connection reset

installing the Apache module with APXS -—— by stone stir-fried rice


1. Reason

a few days ago migrated the system, found a script that configured the fastcgi download file always prompts similar Connection Reset by peer:fastcgi error, later found that the download file should be more than the fastcgi specified idle-timeout caused, the time default is 30 seconds, the file is too large to time out. To solve this problem, the CGI script running environment of the downloaded file is configured as CGI.

However, the apache2.4.7 has already defaulted on the Mod_cgid module instead of the mod_cgi module, and the Mod_cgid module conflicts with the Python Jon module I used, so I have to reinstall the MOD_CGI module to replace the Mod_cgid module. Before I was compiled with the source code apache2.4.7, thought this back pit Daddy, recompile Apache to hang the line system environment on the pit. Fortunately, thanks to the Almighty Internet, the bitter force of the search for one hours, and finally found a need not recompile Apache installation of new modules, so, test machine on the installation to the online environment, with the MOD_CGI module replacement Mod_cgid module, with the Jon Module is perfectly compatible with the The file can be downloaded successfully.


2.apxs Tool Add Module

First of course is to find the source of apache2.4.7, enter the $apache_src_home/modules/generators directory, will find the following mod_ CGI.C file and then compile it using the APXS tool (note that if it's APACHE installed like me, the Apxs tool is automatically installed, under the $apache_home/bin directory).

APXS Compile Module command:

$APACHE _home/bin/apxs-i-a-c MOD_CGI.C

If there is no error, then congratulations, the installation was successful. You can go to Apache modules directory to see if there is mod_cgi.so this file, some words will be no problem. Then the next step is to modify the httpd.conf file, remove the statement that loads the Mod_cgid module, and add the statement that loads the mod_cgi module, as follows:

#LoadModule cgid_module modules/mod_cgid.so LoadModule cgi_module modules/mod_cgi.so

Finally, restarting Apache is OK.


3. References

Installing the module to Apache using the Apxs tool

Installing the Apache module with APXS

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.