(转)[HowTo] Ubuntu, Lighttpd and PHP5
来源:互联网 发布:下载命中双色球软件 编辑:程序博客网 时间:2024/06/14 17:30
http://hqman.javaeye.com/blog/180374
Here’s the whole procedure for anyone who is interested.
$ sudo apt get install lighttpd php5-cgi
$ sudo lighty-enable-mod fastcgi
Lighty is installed and running with fastcgi support and PHP is installed, too. Now we only have to change some configuration options to actually make PHP run inside lighty.
Open lighty’s fastcgi.conf
$ gksudo gedit /etc/lighttpd/conf-enabled/10-fastcgi.conf
Change:
## Start an FastCGI server for php4 (needs the php4-cgi package)
fastcgi.server = ( ".php" =>
((
"bin-path" => "/usr/bin/php4-cgi",
"socket" => "/tmp/php.socket",
"max-procs" => 2,
"idle-timeout" => 20,
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "4",
"PHP_FCGI_MAX_REQUESTS" => "10000"
),
"bin-copy-environment" => (
"PATH", "SHELL", "USER"
),
"broken-scriptfilename" => "enable"
))
)
to:
## Start an FastCGI server for php5 (needs the php5-cgi package)
fastcgi.server = ( ".php" =>
((
"bin-path" => "/usr/bin/php5-cgi",
"socket" => "/tmp/php.socket",
"max-procs" => 1,
"idle-timeout" => 20,
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "2",
"PHP_FCGI_MAX_REQUESTS" => "10000"
),
"bin-copy-environment" => (
"PATH", "SHELL", "USER"
),
"broken-scriptfilename" => "enable"
))
)
You can change the “max-procs” and “PHP_FCGI_CHILDREN” if you really need to, but I found the values as seen above to be perfectly suited for development.
Restart lighty like this:
$ sudo /etc/init.d/lighttpd force-reload
- (转)[HowTo] Ubuntu, Lighttpd and PHP5
- Ubuntu 9.04 Server 搭建Lighttpd+PHP5+MySQL完美Web服务器
- Howto Install and Configure VTK on Ubuntu
- Howto Install and Configure QtCreator on Ubuntu
- Howto Install and Configure PCL on Ubuntu
- Howto Install and Configure ROS on Ubuntu
- 在 Fedora 7 上安装基于 Lighttpd 的 PHP5 And MySQL(转载自:PHP5研究室)
- Howto Install and Configure Chinese Input Methods on Ubuntu
- Howto Install and Configure Doxygen for QtCreator on Ubuntu
- Howto Write and build ROS program on Ubuntu
- ubuntu安装lighttpd
- ubuntu下安装lighttpd
- Ubuntu安装Lighttpd
- UBIFS FAQ and HOWTO
- Plug-and-Play-HOWTO
- UBI FAQ and HOWTO
- UBIFS FAQ and HOWTO
- UBIFS FAQ and HOWTO
- AutoHotkey - 獻給懶惰的程式設計人員
- MTK死机bug大全
- 在android的状态栏(statusbar)中增加menu,home和back快捷键的方法
- [Resume][Jie Zhang]
- 飞鸽传书中 bind() error=10048错误
- (转)[HowTo] Ubuntu, Lighttpd and PHP5
- [Resume][Jie Zhang]
- JBoss 中 应用程序的log4j的配置
- 【转载】NVelocity入门,为服务器与客户端传输xml数据,实现Ajax通信铺平道路
- XML文件生成读入
- 计算机网络
- java 生成图片验证
- 设置input的只读属性
- Python类继承简单实现