Lighttpd PHP fastcgi configuration
来源:互联网 发布:如何进行大数据分析 编辑:程序博客网 时间:2024/05/06 09:03
FastCGI is a language independent, scalable, open extension to CGI that provides high performance without the limitations of server specific APIs. FastCGI provides better scalability and performance. Instead of creating a new process (the CGI program) for every request, FastCGI uses a single persistent process which handles many requests over its lifetime. (See wikipedia article for more information)
Make sure php support fastcgi
Type any one of the following command to verify that php support fastcgi$ php -v
Output:
PHP 5.0.4 (cli) (built: Nov 8 2005 08:27:12)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.4-dev, Copyright (c) 1998-2004 Zend Technologies
OR$ php-cgi -v
Output:
PHP 5.0.4 (cgi-fcgi) (built: Nov 8 2005 08:25:54)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.4-dev, Copyright (c) 1998-2004 Zend Technologies
You must get string cgi-fcgi. Next find out full path to php-cgi or php binary:$ which php-cgi
Output:
/usr/bin/php-cgi
Open lighttpd configuration file:# vi /etc/lighttpd/lighttpd.conf
First add the module mod_fastcgi (lighttpd provides an interface to a external programs that support the FastCGI interface via this module). Make sure your server.modules loades mod_fastcgi:
server.modules = (
"mod_access",
"mod_accesslog",
"mod_fastcgi",
"mod_rewrite",
"mod_auth"
)
Now add following lines to configuration:
fastcgi.server = ( ".php" => ((
"bin-path" => "/usr/bin/php-cgi",
"socket" => "/tmp/php.socket"
)))
Save the configuration and close all the files. Restart the lighttpd:# /etc/init.d/lighttpd restart
Test your configuration by running php program or application.
from
http://www.cyberciti.biz/tips/lighttpd-php-fastcgi-configuration.html
- Lighttpd PHP fastcgi configuration
- windows下使用lighttpd+php(fastcgi)+mysql
- lighttpd+php(fastcgi) 移植到arm-linux
- lighttpd fastcgi
- Lighttpd - Configuration
- 面向高负载的架构Lighttpd+PHP(FastCGI)+Memcached+Squid
- 面向高负载的架构Lighttpd+PHP(FastCGI)+Memcached+Squid
- 面向高负载的架构Lighttpd+PHP(FastCGI)+Memcached+Squid
- 安装配置Linux+lighttpd+mysql+PHP(FastCGI)
- 安装配置Linux+lighttpd+mysql+PHP(FastCGI)
- Windows XP下安装Lighttpd、PHP、MYSQL(Fastcgi)!
- FreeBSD + Lighttpd + Django + FastCGI
- lighttpd + fastcgi + ssl (openssl)
- libjson + lighttpd + fastcgi 编译
- lighttpd+fastcgi EventSource测试
- 说说lighttpd的fastcgi
- Lighttpd 配置fastcgi
- Lighttpd fastcgi相关配置
- S2SH整合所需JAR包及其详解
- android XML解析
- 黑弓老师的weblogic 培训 视频
- 小题目
- c++ 输入字符串,输出数字
- Lighttpd PHP fastcgi configuration
- struts2 初学(一)简单的登录系统
- 统计字符串中的英文数字数目
- Dynamic-link library
- 励志的诗词
- 我也开始写写IT文章
- 图像各种深度的处理及gvf snake中的CvSepFilter
- Java 汉诺塔的实现
- 走过,路过,不要错过!经典语录全集!!!