數位天堂

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

您尚未登入。

#1 2008-09-15 11:54:46

k13080215
新生
註冊日期: 2008-09-08
文章數: 44
目前積分 :   

lighttpd + fastCGI 安裝教學

請先把ASUS主要的網頁移到其他的port
因為port80要拿來架設網頁的

$ nvram set http_lanport=8080 $ nvram commit $ reboot


1.安裝lighttpd以及FastCGI

$ ipkg install lighttpd $ ipkg install php-fcgi


2.停用lighttpd

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


3.編輯 /opt/etc/lighttpd/lighttpd.conf(使用vi編輯器 要用nano或者joe都可以 )

$ vi /opt/etc/lighttpd/lighttpd.conf


###進入編輯狀態了###
(打字前請先按A開啟打字模式 按ESC之後按下"/"開啟搜尋模式)
按下"/"搜尋"server.port"
將數值從預設的8081改成80
按下"/"搜尋"url.access-deny"
按下兩次D刪除一整行並貼上開啟支援.sqlite

url.access-deny = ( "~", ".inc",".sqlite" )


搜尋 "# server.event-handler = "freebsd-kqueue" # needed on OS X"
改成 "server.event-handler = "poll" # needed on OS X"
按esc鍵輸入:x存檔離開
###離開編輯狀態了###

接著啟動lighttpd

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


打開瀏覽器輸入你自己的IP例如192.168.1.1
看看有沒有出現
lighttpd server is running
如果有就是成功囉

可以去玩PHP的其他東西了YA YA
--------------------------------------------------
參考文章以及感謝名單
https://digiland.tw/viewtopic.php?id=293&p=2 第20樓的qycity感謝他教了可以把ASUS選單移到其他port的指令
https://digiland.tw/viewtopic.php?id=234 感謝第3樓的igotcha發表除錯教學
http://wl500g.info/showthread.php?t=11481&page=3 第43樓的DrChair感謝他發表意見表示有可能是程式衝突
http://abintech.azhai.org/2007/01/php-l … stcgi.html 感謝Abin發表教學文章



最後修改: k13080215 (2008-09-15 20:44:20)


離線

 

#2 2008-09-15 13:46:23

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

Re: lighttpd + fastCGI 安裝教學

感謝分享,本篇加入索引啦 thankgod




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

離線

 

#3 2008-10-06 14:16:03

maha
新生
註冊日期: 2008-10-03
文章數: 17
目前積分 :   

Re: lighttpd + fastCGI 安裝教學

各位好
我照著安裝成功了,可是出現了一個問題,機器reboot後必須要手動

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


而且連代的samba&sctcs在每次reboot都要手動啓動,請問這要怎解決,謝謝
對了!我的機器是 500gp v2,靭體版本 Oleg 1.9.2.7-10


離線

 

#4 2008-10-06 21:13:20

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

Re: lighttpd + fastCGI 安裝教學

maha 提到:

各位好
我照著安裝成功了,可是出現了一個問題,機器reboot後必須要手動

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


而且連代的samba&sctcs在每次reboot都要手動啓動,請問這要怎解決,謝謝
對了!我的機器是 500gp v2,靭體版本 Oleg 1.9.2.7-10

那應該是 /opt/etc/init.d/rc.unslung 這一個啟動程序沒有正常執行,
請回頭檢視並參考基本改機流程那一篇關於 /opt/etc/init.d/rc.unslung 設定的部份是否正確。



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

離線

 

#5 2008-10-06 23:47:38

maha
新生
註冊日期: 2008-10-03
文章數: 17
目前積分 :   

Re: lighttpd + fastCGI 安裝教學

呵呵 的確是沒有設 /opt/etc/init.d/rc.unslung 的關係
感謝站長的指教



離線

 

#6 2008-12-10 23:19:37

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

Re: lighttpd + fastCGI 安裝教學

安裝完 lighttpd & php 後,建議可測試一下 phpinfo(),可同時驗證 http 及 php 的功能。
步驟:
1.建立 /opt/share/www/index.php

nano /opt/share/www/index.php


內容如下:

<?php phpinfo(); ?>


2.從瀏覽器裡執行http://192.168.1.1/,這時會出現如下圖的 PHP 資訊網頁,那就表示成功了。
https://digiland.tw/img/upload/phpinfo_20081210.jpg



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

離線

 

#7 2008-12-12 16:38:02

k13080215
新生
註冊日期: 2008-09-08
文章數: 44
目前積分 :   

Re: lighttpd + fastCGI 安裝教學

抱歉喔 完全忘記提到防火牆設定
一般來說把PORT 80打開別人就可連進來了


離線

 

#8 2008-12-25 21:33:34

oldhan
精靈
註冊日期: 2007-11-19
文章數: 133
目前積分 :   

Re: lighttpd + fastCGI 安裝教學

手賤 ipkg upgrade 後網頁不見 orz, 找到此篇做到 /opt/etc/init.d/S45php start
後出現錯誤訊息 /opt/etc/init.d/S45php: /opt/etc/init.d/S45php: 15: /opt/bin/php-fcgi: not found, 請問是怎麼回事?
還有上面那個貼入 S45php 的 :x 是否為筆誤?

最後修改: oldhan (2008-12-25 21:45:41)


離線

 

#9 2008-12-25 22:14:33

oldhan
精靈
註冊日期: 2007-11-19
文章數: 133
目前積分 :   

Re: lighttpd + fastCGI 安裝教學

重複反安裝/安裝數次之後就成功了milk


離線

 

#10 2008-12-29 23:28:08

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

Re: lighttpd + fastCGI 安裝教學

執行

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


後出現問題

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


請問如何解決?


離線

 

相關討論主題

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

友情連結

論壇頁尾

Powered by PunBB
© Copyright 2018 Rickard Andersson
RSS Feed