lighttpd安装配置支持php
生活随笔
收集整理的這篇文章主要介紹了
lighttpd安装配置支持php
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
轉載鏈接:https://wiki.freebsdchina.org/howto/n/php_fastcgi_lighttpd
安裝lighttpd
記得在SPAWNFCGI前打勾
[X] SPAWNFCGI Depend on spawn-fcgi utility #cd /usr/ports/www/lighttpd #make config #make install clean安裝php
模塊自己看自己需要
#cd /usr/ports/lang/php5/ && make install clean #cd /usr/ports/lang/php5-extensions/ && make install clean配置lighttpd
編輯/usr/local/etc/lighttpd/lighttpd.conf,添加以下內容:
server.modules += ( "mod_fastcgi" ) fastcgi.server = ( ".php" =>(( "socket" => "/tmp/php-fastcgi.socket","bin-path" => "/usr/local/bin/php-cgi","min-procs" => 1,"max-procs" => 1,"max-load-per-proc" => 4,"bin-environment" => ("PHP_FCGI_CHILDREN" => "2",#"PHP_FCGI_CHILDREN" => "64",//這里進程數自己看著辦"PHP_FCGI_MAX_REQUESTS" => "10000" ),"bin-copy-environment" => ("PATH", "SHELL", "USER" ),"broken-scriptfilename" => "enable","idle-timeout" => 20)) )設置服務
啟動lighttpd
#echo 'lighttpd_enable="YES"' >> /etc/rc.conf #/usr/local/etc/rc.d/lighttpd start網站跟目錄是修改這行
server.document-root = "/usr/local/www/data/"總結
以上是生活随笔為你收集整理的lighttpd安装配置支持php的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: java重要基础知识点_java基础知识
- 下一篇: PHP5加载|安装外部C动态库