數位天堂

Nokia:科技始終來自於人性; 拜耳:如果文明不能使我們更相愛,那科技便失去意義!
歡迎您的加入,讓我們一起討論科技與環保的整合應用...

您尚未登入。

#11 2008-12-30 09:19:38

Aven
天使
來自: 數位天堂
註冊日期: 2007-07-15
文章數: 2266
網站

Re: lighttpd + fastCGI 安裝教學

airfox1 提到:

執行

$ /opt/etc/init.d/S45php start


後出現問題

$ /opt/bin/php-fcgi: can't load library 'libiconv.so.2


請問如何解決?

試試看

$ ipkg install libiconv




技術問題請於論壇上集眾人之力公開討論,感恩 thankgod

離線

 

#12 2008-12-30 22:40:19

airfox1
新生
註冊日期: 2008-12-29
文章數: 4
目前積分 :   

Re: lighttpd + fastCGI 安裝教學

Aven 提到:

airfox1 提到:

執行

$ /opt/etc/init.d/S45php start


後出現問題

$ /opt/bin/php-fcgi: can't load library 'libiconv.so.2


請問如何解決?

試試看

$ ipkg install libiconv

謝謝Aven大的回答,問題解決了
另外當我執行

$ /opt/etc/init.d/S80lighttpd start


後出現

Starting web server: lighttpd configfile.c.819: 0, (null) Segmentation fault


請問是否有問題?
因為我在瀏覽器輸入http://192.168.1.1後沒有網頁顯示



離線

 

#13 2008-12-31 09:33:30

Aven
天使
來自: 數位天堂
註冊日期: 2007-07-15
文章數: 2266
網站

Re: lighttpd + fastCGI 安裝教學

airfox1 提到:

另外當我執行

$ /opt/etc/init.d/S80lighttpd start


後出現

Starting web server: lighttpd configfile.c.819: 0, (null) Segmentation fault


請問是否有問題?
因為我在瀏覽器輸入http://192.168.1.1後沒有網頁顯示

lighttpd & php-fcgi 先移除再重新安裝一次看看。



技術問題請於論壇上集眾人之力公開討論,感恩 thankgod

離線

 

#14 2009-01-07 23:27:37

airfox1
新生
註冊日期: 2008-12-29
文章數: 4
目前積分 :   

Re: lighttpd + fastCGI 安裝教學

重新安裝一次後成功了,謝謝Aven


離線

 

#15 2009-01-08 22:47:28

airfox1
新生
註冊日期: 2008-12-29
文章數: 4
目前積分 :   

Re: lighttpd + fastCGI 安裝教學

請問可不可以運行 .cgi 或 .pl 檔?



離線

 

#16 2009-01-08 23:08:35

Aven
天使
來自: 數位天堂
註冊日期: 2007-07-15
文章數: 2266
網站

Re: lighttpd + fastCGI 安裝教學

airfox1 提到:

請問可不可以運行 .cgi 或 .pl 檔?

沒有試過,應該還要安裝 perl 解譯器才能跑吧

參考文件:
http://www.macsat.com/macsat/content/view/24/29/



技術問題請於論壇上集眾人之力公開討論,感恩 thankgod

離線

 

#17 2009-04-04 22:45:01

dreams
新生
註冊日期: 2008-04-27
文章數: 15
目前積分 :   

Re: lighttpd + fastCGI 安裝教學

出現問題了
[admin@WL-0013D4187968 root]$ /opt/etc/init.d/S45php start
[admin@WL-0013D4187968 root]$ Cannot bind/listen socket - [125] Address already
Couldn't create FastCGI listen socket on port 1026

這怎麼解決呢?

重裝了好幾次~~~可是都一樣的問題

wl-500gx 1.9.2.7-10
有人成功的嗎?

最後修改: dreams (2009-04-05 20:06:16)


離線

 

#18 2009-08-20 00:31:22

hippo
天使
註冊日期: 2008-10-07
文章數: 1562
目前積分 :   20 

Re: lighttpd + fastCGI 安裝教學

以下是我在WL-HDD(CDMA@wifi)安裝LightTPD + PHP.
LightTPD使用FastCGI解譯PHP檔案(/opt/etc/lighttpd/conf.d/10-php-fcgi.conf).
PHP使用eAccelerator作快取(/opt/etc/php.d/eaccelerator.ini).
網頁內容由zlib壓縮後輸出.

1. 安裝套件:
lighttpd - 1.4.23-1 - A fast webserver with minimal memory footprint.
php-fcgi - 5.2.10-3 - The php scripting language, built as an fcgi module
eaccelerator - 0.9.5.3-5.2.10-1 - Yet another php cache / accelerator

$ ipkg-opt install lighttpd php-fcgi eaccelerator


2. 檢查PHP模組

$ php -m


3. 修改php.ini
$ nano /opt/etc/php.ini

zlib.output_compression = On


4. 建立phpinfo.php
$ nano /opt/share/www/phpinfo.php


5. 重新啟動LightTPD, 檢查log

$ /opt/etc/init.d/S80lighttpd restart $ tail /opt/var/log/lighttpd/error.log


6. 開啟瀏覽器, 測試PHP

http://192.168.1.1:8081/phpinfo.php


好了, 如果看到網頁, 即表示LightTPD能使用PHP.
另外, 可比對zlib.output_compression = On或Off, 查看輸出網頁內容大小的不同.
eAccelerator快取存放在/opt/tmp/eaccelerator/

以下使用LightTPD模組.
1. mod_compress: 壓縮靜態網頁(參閱/opt/share/doc/lighttpd/compress.txt)
$ nano /opt/etc/lighttpd/conf.d/01-default.conf

server.modules += ( "mod_compress" ) compress.cache-dir = "/opt/tmp/lighttpd/cache/compress/" compress.filetype = ("text/plain", "text/html")


2. mod_alias: 使用別名(參閱/opt/share/doc/lighttpd/alias.txt). 在網址, 藉由目錄切換, 可使用不同的PHP App(DokuWiki, PunBB等). 以/opt/share/doc/舉例, 藉由瀏覽器閱讀已安裝套件的相關說明文件.
$ nano /opt/etc/lighttpd/conf.d/01-default.conf

server.modules += ( "mod_alias" ) alias.url = ( "/doc/" => "/opt/share/doc/" ) dir-listing.activate = "enable"


3. 重新啟動LightTPD, 檢查log

$ /opt/etc/init.d/S80lighttpd restart $ tail /opt/var/log/lighttpd/error.log


6. 開啟瀏覽器, 測試

http://192.168.1.1:8081/doc/


同理, 由alias.url可指定不同的PHP App.
如果不喜歡這種做法, 也可使用Virtual Hosting. name-based virtual hosting還要DNS的配合.
如何開機自動啟動, 我就不贅述了.

同步更新 wiki
LightTPD
PHP


離線

 

#19 2009-09-24 02:04:10

ayunews
新生
註冊日期: 2009-09-19
文章數: 8
目前積分 :   

Re: lighttpd + fastCGI 安裝教學

請大大幫忙
裝了lighttpd + FastCGI  查看PHP.INI 發現without-inconv
本來想裝php-iconv
但ipkg list | grep  php 發現沒有php-iconv


離線

 

#20 2009-09-24 08:56:37

Aven
天使
來自: 數位天堂
註冊日期: 2007-07-15
文章數: 2266
網站

Re: lighttpd + fastCGI 安裝教學

ayunews 提到:

請大大幫忙
裝了lighttpd + FastCGI  查看PHP.INI 發現without-inconv
本來想裝php-iconv
但ipkg list | grep  php 發現沒有php-iconv

關於 iconv 需求,可以外掛方式來使用,
請參考這一篇的做法: https://digiland.tw/viewtopic.php?id=50



技術問題請於論壇上集眾人之力公開討論,感恩 thankgod

離線

 

相關討論主題

主題 回覆 點閱 最後發表
8 29580 2013-01-07 01:06:38 作者 clonglii
lighttpd 與 nginx 問題~ 作者 ezo00001
1 9751 2011-06-22 21:55:11 作者 hippo
Linux BT速度之王-RTORRENT 安裝教學 作者 ken1029  [ 1 2 3 … 9 ]
80 255827 2011-06-03 22:35:44 作者 amingo
0 7905 2011-05-19 11:56:05 作者 hippo
Tomato 安裝教學 作者 game9910
1 24625 2010-12-13 09:17:22 作者 hippo

友情連結

論壇頁尾

Powered by PunBB
© Copyright 2018 Rickard Andersson
RSS Feed