數位天堂

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

您尚未登入。

#21 2010-01-11 18:06:09

em2it
新生
註冊日期: 2009-05-04
文章數: 9
目前積分 :   

Re: lighttpd + fastCGI 安裝教學

參考了k13080215大大做法及, Abin的教學文章...試裝結果...不行

啟動 /opt/etc/init.d/S80lighttpd start 應該沒問題

$ /opt/etc/init.d/S80lighttpd start Starting web server: lighttpd


但是啟動 /opt/etc/init.d/S45php start 就出現下列錯誤...不知道哪裡有問題
已經重裝好多次了ToT

$ /opt/etc/init.d/S45php start Cannot bind/listen socket - [125] Address already in use. Couldn't create FastCGI listen socket on port 1026


字面上的意見是無法建立在 1026 port 上的監聽器
但是我firewall上面已經有輸入

$ vi /usr/local/sbin/post-firewall


#!/bin/sh iptables -D INPUT -j DROP iptables -A INPUT -p tcp --dport 51777:51780 -j ACCEPT iptables -A INPUT -p udp --dport 6881 -j ACCEPT iptables -A INPUT -p tcp --dport 1026 -j ACCEPT iptables -A INPUT -p udp --dport 1026 -j ACCEPT iptables -A INPUT -j DROP


不知道哪邊有改錯...., 麻煩前輩指導~謝謝

補充:lighttpd (1.4.25-1),  php-fcgi (5.2.12-1)


最後修改: em2it (2010-01-11 19:44:07)


離線

 

#22 2010-01-11 23:09:18

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

Re: lighttpd + fastCGI 安裝教學

新版本的 lighttpd 已經不需要再建立 /opt/etc/init.d/S45php 檔案
安裝 lighttpd 會建立一個 /opt/etc/lighttpd/conf.d/10-php-fcgi.conf 設定檔
內容如下:

server.modules += ( "mod_fastcgi" ) fastcgi.server = ( ".php" => ( "localhost" => ( "socket" => "/tmp/php-fcgi.sock", "bin-path" => "/opt/bin/php-fcgi", "max-procs" => 1, "bin-environment" => ( "PHP_FCGI_CHILDREN" => "2", "PHP_FCGI_MAX_REQUESTS" => "1000" ) ) ) )


當您啟動 S80lighttod 時,系統會一併將 php-fcgi 啟動。
所以看一下您 ps 內容,php-fcgi 是否已經啟動?




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

離線

 

#23 2010-01-11 23:15:10

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

Re: lighttpd + fastCGI 安裝教學

我的作法:
$ ipkg-opt install lighttpd php-fcgi eaccelerator
檢查設定檔, 作必要的修改.
/opt/etc/lighttpd/lighttpd.conf
/opt/etc/php.ini
/opt/etc/lighttpd/conf.d/10-php-fcgi.conf
/opt/etc/php.d/eaccelerator.ini
重新啟動
$ /opt/etc/init.d/S80lighttpd restart


離線

 

#24 2010-01-11 23:40:52

em2it
新生
註冊日期: 2009-05-04
文章數: 9
目前積分 :   

Re: lighttpd + fastCGI 安裝教學

感謝Aven & hippo
雖然我又移掉~也沒建 /opt/etc/init.d/S45php
改的方式照k13080215的方式
一樣php無法執行

我有兩點疑惑...ToT
1.  /opt/etc/lighttpd/lighttpd.conf 裡面的fastcgi.server 的註解還需要拿掉嘛?那有需要做什麼修改(註解目前我沒拿掉, 拿掉會產生錯誤)
2. /opt/etc/lighttpd/conf.d/10-php-fcgi.conf 裡面的fastcgi.server 需要做修改嗎

輸入ps後出現以下畫面

PID Uid VmSize Stat Command 216 admin 132 S dropbear 217 admin 8 S /bin/sh 218 admin 5604 S rtorrent -n -o import=/opt/etc/rtorrent.conf 219 admin 8 S /opt/bin/php-fcgi -b 1026 220 admin 312 S /opt/bin/php-fcgi 221 admin 312 S /opt/bin/php-fcgi 232 admin 352 S -sh 297 admin 664 S /opt/sbin/nmbd -D 299 admin 472 S /opt/sbin/smbd -D 300 admin 120 S /opt/sbin/smbd -D 372 admin 2560 S /opt/sbin/smbd -D 389 admin 392 R ps


在219~221 這樣php-fcgi算有啟動嗎@@?
我的php 路徑是放server.document-root        = "/opt/share/www/"
但是我建了一個php網頁
內容


一樣跑不出來...
太笨了我~ToT

補充~剛發現一個問題~我將asus的系統操作網頁改為8080可以進去telnet也通
但是我後來telnet 192.168.1.1 80 就不通了.....
我防火牆的設置

#!/bin/sh iptables -D INPUT -j DROP # rtorrent iptables -A INPUT -p tcp --dport 51777:51780 -j ACCEPT iptables -A INPUT -p udp --dport 6881 -j ACCEPT # lighttpd iptables -A INPUT -p tcp --dport 80 -j ACCEPT iptables -A INPUT -p tcp --dport 8081 -j ACCEPT # system setup iptables -A INPUT -p tcp --dport 8080 -j ACCEPT # fast-cgi server iptables -A INPUT -p tcp --dport 1026 -j ACCEPT iptables -A INPUT -j DROP


最後修改: em2it (2010-01-11 23:55:25)


離線

 

#25 2010-01-11 23:50:09

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

Re: lighttpd + fastCGI 安裝教學

看來是您的 php-fcgi 是正常啟動了,但 lighttpd 並沒有順利啟動 fear
請參考第一篇 mod_fastcgi 註解需要拿掉,fastcgi.server 的註解不須要拿掉
server.port 設定多少? 先試試看改 8080 吧。
dd-wrt 預設 80 port 是系統管理界面,請記得避開。
啟動時有錯誤訊息,請一併列出來參考。




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

離線

 

#26 2010-01-12 00:02:10

em2it
新生
註冊日期: 2009-05-04
文章數: 9
目前積分 :   

Re: lighttpd + fastCGI 安裝教學

謝謝Aven
我已經參考第一篇 mod_fastcgi 註解有拿掉,fastcgi.server 的註解還在

tail /opt/var/log/lighttpd/error.log
如下

2010-01-11 21:38:17: (log.c.166) server started 2010-01-11 21:38:17: (server.c.1105) fdevent_init failed



離線

 

#27 2010-01-12 00:05:33

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

Re: lighttpd + fastCGI 安裝教學

em2it 提到:

謝謝Aven
我已經參考第一篇 mod_fastcgi 註解有拿掉,fastcgi.server 的註解還在

tail /opt/var/log/lighttpd/error.log
如下

2010-01-11 21:38:17: (log.c.166) server started 2010-01-11 21:38:17: (server.c.1105) fdevent_init failed


了解問題出在哪了
請參考 https://digiland.tw/viewtopic.php?pid=4468#p4468



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

離線

 

#28 2010-01-12 00:30:16

em2it
新生
註冊日期: 2009-05-04
文章數: 9
目前積分 :   

Re: lighttpd + fastCGI 安裝教學

Aven 提到:

em2it 提到:

謝謝Aven
我已經參考第一篇 mod_fastcgi 註解有拿掉,fastcgi.server 的註解還在

tail /opt/var/log/lighttpd/error.log
如下

2010-01-11 21:38:17: (log.c.166) server started 2010-01-11 21:38:17: (server.c.1105) fdevent_init failed


了解問題出在哪了
請參考 https://digiland.tw/viewtopic.php?pid=4468#p4468

哇~帥呆了Aven
終於可以了......從中午弄到現在...終於可以了
太感動了~非常非常的謝謝


離線

 

#29 2010-01-22 14:31:11

st012620
新生
註冊日期: 2009-09-27
文章數: 6
目前積分 :   

Re: lighttpd + fastCGI 安裝教學

我執行$ /opt/etc/init.d/S80lighttpd start
後會出現此訊息該如何解決

[admin@WL-00261839F522 ftp]$ /opt/etc/init.d/S80lighttpd start
Starting web server: lighttpd
2010-01-22 14:15:44: (network.c.345) can't bind to port:  80 Address already in use


已經將wl-520gu管理介面移到8080port了 仍會出現此問題

ps資訊
[admin@WL-00261839F522 ftp]$ ps
  PID  Uid     VmSize Stat Command
    1 admin       184 S   /sbin/init
    2 admin           SW  [keventd]
    3 admin           RWN [ksoftirqd_CPU0]
    4 admin           SW  [kswapd]
    5 admin           SW  [bdflush]
    6 admin           SW  [kupdated]
    7 admin           SW  [mtdblockd]
   57 admin        96 S   telnetd
   62 admin       220 S   httpd vlan1
   67 admin       140 S   syslogd -m 0 -O /tmp/syslog.log -S -l 7
   68 admin        84 S   klogd
   70 nobody      288 S   [dnsmasq]
   72 admin        92 S   nas /tmp/nas.lan.conf /tmp/nas.lan.pid lan
   75 admin           SW  [khubd]
   83 admin        88 S   lpd
   85 admin        76 S   p9100d -f /dev/usb/lp0 0
   88 admin        84 S   waveservermain
   92 admin           SW  [usb-storage-0]
   93 admin           SW  [scsi_eh_0]
   99 admin       188 S   pppd file /tmp/ppp/options.wan0
  101 admin        84 S   infosvr br0
  102 admin       356 S   watchdog
  103 admin       104 S   ntp
  123 admin           SW  [kjournald]
  132 admin        12 S   /opt/sbin/xinetd
  149 admin           SW  /bin/sh /opt/bin/mysqld_safe --datadir=/opt/var/lib/m
  230 admin       136 S   /opt/sbin/lighttpd -f /opt/etc/lighttpd/lighttpd.conf
  233 admin       104 S   /opt/bin/php-fcgi
  241 admin        28 S   /opt/libexec/mysqld --basedir=/opt --datadir=/opt/var
  242 admin       260 S   /usr/sbin/smbd -D -l /opt/var/log/smbd.log -s /opt/et
  244 admin       560 S   /usr/sbin/nmbd -D -n WL-520GU -o -l /tmp -s /opt/etc/
  249 admin       184 S   dropbear
  253 admin        32 S   /opt/libexec/mysqld --basedir=/opt --datadir=/opt/var
  254 admin        32 S   /opt/libexec/mysqld --basedir=/opt --datadir=/opt/var
  255 admin       820 S   /opt/bin/php-fcgi
  256 admin       868 S   /opt/bin/php-fcgi
  267 admin       440 S   -sh
  933 admin       460 S   upnp -D -L br0 -W ppp0
  952 admin       396 R   ps


離線

 

#30 2010-01-22 16:43:44

st012620
新生
註冊日期: 2009-09-27
文章數: 6
目前積分 :   

Re: lighttpd + fastCGI 安裝教學

補上log紀錄
[admin@WL-00261839F522 ftp]$ tail /opt/var/log/lighttpd/error.log
2010-01-22 10:46:55: (server.c.1503) server stopped by UID = 0 PID = 1
2010-01-22 10:46:55: (server.c.1493) unlink failed for: /var/run/lighttpd.pid 2 No such file or directory
2010-01-22 10:46:55: (server.c.1503) server stopped by UID = 0 PID = 1
1970-01-01 08:00:17: (log.c.166) server started
2010-01-22 14:53:16: (server.c.1503) server stopped by UID = 0 PID = 1000
2010-01-22 14:53:19: (log.c.166) server started
2010-01-22 15:18:54: (server.c.1503) server stopped by UID = 0 PID = 1051
2010-01-22 15:43:45: (log.c.166) server started
2010-01-22 15:45:02: (server.c.1503) server stopped by UID = 0 PID = 1
2010-01-22 16:16:03: (log.c.166) server started


離線

 

相關討論主題

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

友情連結

論壇頁尾

Powered by PunBB
© Copyright 2018 Rickard Andersson
RSS Feed