Build a server with Apache + spawn-fcgi + fast-cgi

Source: Internet
Author: User
Tags apache php

This use spawn-fcgi to manage fastcgi in order to achieve the optimization of Apache PHP performance method compared to the alternative, we all right when a reference.

Method: The system platform is CentOS 5, the premise is that lamp has been configured well, running normally.

1. Wget-c http://www.21andy.com/centos/5/i386/spawn-fcgi-1.6.3-1.el5.i386.rpm (can also go to the official download source package compiled installation:/HTTP www.lighttpd.net/download/spawn-fcgi-1.6.3.tar.gz)
2. RPM-IVH spawn-fcgi-1.6.3-1.el5.i386.rpm
3. Use spawn-fcgi to control the php-cgi fastcgi process:
/usr/bin/spawn-fcgi-a 127.0.0.1-p 9000-c 5-u apache-g apache-f/usr/bin/php-cgi


The parameters have the following meanings:
- f <fcgiapp> Specifies the execution program location of the process that calls fastcgi, depending on the PHP situation installed on the system.
-a <addr> bind to address addr.
-P <port> bind to ports port.
-S <path> path bound to the UNIX socket.
- C <childs> Specifies the number of processes generated by the fastcgi, which defaults to 5. (PHP only)
- p <path> Specifies the path of the PID file for the resulting process.
what identity is used by-u and-G fastcgi (-u user-G user group), the Apache user can be used under CentOS, and other configurations such as nobody, Www-data and so on.
4. Add this line of code to the bottom of the/etc/rc.local file so that the PHP fastcgi process can be started at the same time as the system starts.

Build a server with Apache + spawn-fcgi + fast-cgi

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.