teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

詳細

2020/06/27 04:22

投稿

rumippu
rumippu

スコア26

title CHANGED
File without changes
body CHANGED
@@ -18,4 +18,126 @@
18
18
  Duplicate config variableと書かれている通り、fcgiサーバー絡みの設定が重複しているように思えるのですが、
19
19
  この戻し方をどなたかご存知でしょうか。
20
20
 
21
- 以上、よろしくお願いいたします。
21
+ 以上、よろしくお願いいたします。
22
+
23
+ 追記:
24
+
25
+ ありがとうございます。
26
+ 私の環境でターミナル出力結果を記載いたします。
27
+
28
+ ```ここに言語を入力
29
+ pi@raspberrypi:/var/www $ ps aux | grep lighttpd
30
+ pi 23715 0.0 0.2 3776 1916 pts/1 S+ 13:14 0:00 grep --color=auto lighttpd
31
+ ```
32
+ 多分正常に起動していないようです。
33
+ ```ここに言語を入力
34
+ pi@raspberrypi:/var/www $ lighttpd -t -f /etc/lighttpd/lighttpd.conf
35
+ Duplicate config variable in conditional 0 global: fastcgi.server
36
+ 2020-06-27 13:15:26: (configfile.c.957) source: /etc/lighttpd/lighttpd.conf line: 48 pos: 1 parser failed somehow near here: (EOL)
37
+
38
+ ```
39
+ ```
40
+ server.modules = (
41
+ "mod_access",
42
+ "mod_alias",
43
+ "mod_compress",
44
+ "mod_redirect",
45
+ "mod_fastcgi",
46
+ # "mod_rewrite",
47
+ )
48
+
49
+ server.document-root = "/var/www"
50
+ server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
51
+ server.errorlog = "/var/log/lighttpd/error.log"
52
+ server.pid-file = "/var/run/lighttpd.pid"
53
+ server.username = "www-data"
54
+ server.groupname = "www-data"
55
+ server.port = 80
56
+
57
+ index-file.names = ( "index.php", "index.html", "index.lighttpd.html" )
58
+ url.access-deny = ( "~", ".inc" )
59
+ static-file.exclude-extensions = ( ".php", ".pl", )
60
+
61
+ compress.cache-dir = "/var/cache/lighttpd/compress/"
62
+ compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" )
63
+
64
+ # default listening port for IPv6 falls back to the IPv4 port
65
+ include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
66
+ include_shell "/usr/share/lighttpd/create-mime.assign.pl"
67
+ include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
68
+
69
+
70
+ fastcgi.server = (
71
+ "doStuff.py" => (
72
+ "doStuff" => (
73
+ "socket" => "/tmp/fastcgi.python.socket",
74
+ "bin-path" => "/var/www/doStuff.py",
75
+ "check-local" => "disable",
76
+ "max-procs" => 1)
77
+ ),
78
+
79
+ "test.py" => (
80
+ "test" => (
81
+ "socket" => "/tmp/test.python.socket",
82
+ "bin-path" => "/var/www/test.py",
83
+ "check-local" => "disable",
84
+ "max-procs" => 1)
85
+ )
86
+ )
87
+
88
+ ```
89
+ 上記には問題なく、おそらくfastcgiがうまく接続できていない(?)ためのエラーのため、
90
+ 最終行をエラーとして返していたのだと思います。
91
+ 昨日まではtest.pyもdoStuff.py(index2.htmlよりdoStuff.py経由でGPIOを操作)も
92
+ サーバーから操作可能でした。
93
+
94
+ ```ここに言語を入力
95
+ pi@raspberrypi:/var/www $ sudo lsof -iTCP -nP
96
+ COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
97
+ sshd 576 root 3u IPv4 9430 0t0 TCP *:22 (LISTEN)
98
+ sshd 576 root 4u IPv6 9432 0t0 TCP *:22 (LISTEN)
99
+ mysqld 1043 mysql 10u IPv4 9561 0t0 TCP 127.0.0.1:3306 (LISTEN)
100
+ smbd 1339 root 35u IPv6 10680 0t0 TCP *:445 (LISTEN)
101
+ smbd 1339 root 36u IPv6 10681 0t0 TCP *:139 (LISTEN)
102
+ smbd 1339 root 37u IPv4 10682 0t0 TCP *:445 (LISTEN)
103
+ smbd 1339 root 38u IPv4 10683 0t0 TCP *:139 (LISTEN)
104
+ Xtightvnc 1597 pi 0u IPv4 9982 0t0 TCP *:6001 (LISTEN)
105
+ Xtightvnc 1597 pi 3u IPv4 9984 0t0 TCP *:5901 (LISTEN)
106
+ Xtightvnc 1597 pi 4u IPv4 9985 0t0 TCP 192.168.0.20:5901->192.168.0.10:49192 (ESTABLISHED)
107
+ sshd 23327 root 3u IPv4 77161 0t0 TCP 192.168.0.20:22->192.168.0.10:52192 (ESTABLISHED)
108
+ sshd 23337 pi 3u IPv4 77161 0t0 TCP 192.168.0.20:22->192.168.0.10:52192 (ESTABLISHED)
109
+ ```
110
+ lighttpdは立ち上がっておりません。。
111
+
112
+ ```
113
+ pi@raspberrypi:/var/www $ ls -l /etc/lighttpd/conf-enabled
114
+ 合計 0
115
+ lrwxrwxrwx 1 root root 33 6月 26 21:56 10-fastcgi.conf -> ../conf-available/10-fastcgi.conf
116
+ lrwxrwxrwx 1 root root 37 6月 26 21:56 15-fastcgi-php.conf -> ../conf-available/15-fastcgi-php.conf
117
+ lrwxrwxrwx 1 root root 42 1月 1 1970 90-javascript-alias.conf -> ../conf-available/90-javascript-alias.conf
118
+ ```
119
+
120
+ ```ここに言語を入力
121
+ pi@raspberrypi:/var/www $ tree
122
+ .
123
+ ├── CreateJsonFromMySql.php
124
+ ├── chart_temp.py.save
125
+ ├── chart_temp2.py
126
+ ├── chart_temp_tmp.py
127
+ ├── doStuff.py
128
+ ├── doStufftest.py
129
+ ├── hello.html
130
+ ├── html
131
+ │   ├── index.lighttpd.html
132
+ │   └── index.nginx-debian.html
133
+ ├── index2.html
134
+ ├── phptest.html
135
+ ├── template.html
136
+ ├── test.java
137
+ ├── test.py
138
+ └── test2.html
139
+ ```
140
+
141
+ ちなみにとりあえずchmod 755で全てのファイルに権限は付与しています。
142
+
143
+ 上記で原因が分かりますでしょうか・・・?