Showing posts with label Lighttpd. Show all posts
Showing posts with label Lighttpd. Show all posts

spawn-fcgi standalone release

自從lighttpd更新到1.4.20後,原本跑的好好的spawn-fcgi就停住了,不曉得是否跟gslin這一篇所提的有關,反正後來只好用1.40.19的版本。

現在spawn-fcgi從lighttpd中獨立出來。試了一下,完全正常。

Release: spawn-fcgi 1.6.0
read on
Posted at 12:33 PM on 3/1/09 | 1 comments
Filed under: ,
 

Lighttpd with PHP and MySQL

好像沒什麼好寫的
  1. cd /usr/ports/blahblah
  2. make install clean
  3. end
PHP安裝選項要選 CGI、FASTCGI。
其他的去 /usr/ports/lang/phpX-extensions 裝。
php.ini中要加
cgi.fix_pathinfo = 1
Lighttpd中MySQL要選。
預設的設定檔 /usr/local/etc/lighttpd.conf 裡面,
"mod_fastcgi",  要打開。

fastcgi.server = ( ".php" =>
( "localhost" =>
(
"socket" => "/tmp/php-fastcgi.sock", 這裡要改成這樣
"bin-path" => "/usr/local/bin/php-cgi" 這裡也是
)
)
)
記得還要自己 touch 記錄檔。

如果有些東西想要藏起來,可以用 "mod_auth" 功能,
有很多種選擇:plain, htpasswd, htdigest, LDAP 等,

以下用簡單的htpasswd就好。

auth.backend = "htpasswd"
auth.backend.htpasswd.userfile ="/path/to/.htpasswd"

auth.require = ( "/要隱藏起來的地方" =>
(
"method" => "basic",
"realm" => "不要進來",
"require" => "user=xxxxx"
)
)

htpasswd 是 apache 內建的程式,也可以透過PHP來產生,可以參考這裡。
read on
Posted at 1:09 AM on 10/29/07 | 2 comments
Filed under: ,