使用 fastcgi 和本地 unix 域套接字启动 lighttpd 失败
/etc/lighttpd.conf:
...
server.modules = (
"mod_fastcgi"
)
server.username = "_lighttpd"
server.groupname = "_lighttpd"
fastcgi.server = (
".fcgi" =>
((
"socket" => "/tmp/a.out.socket",
"bin-path" => "/tmp/a.out"
))
)
...
我以 root 身份运行:
spawn-fcgi -s /tmp/a.out.socket -n -u _lighttpd -g _lighttpd -U _lighttpd -G _lighttpd -- /tmp/a.out
ps aux:
...
_lighttpd 28973 0.0 0.2 448 596 p1 I+ 2:33PM 0:00.01 /tmp/a.out
...
ls -ltr /tmp
-rwxr-xr-x 1 _lighttpd _lighttpd 6992 Jul 16 13:38 a.out
srwxr-xr-x 1 _lighttpd _lighttpd 0 Jul 16 14:33 a.out.socket
现在我尝试以 root 身份启动 lighttpd:
/usr/local/sbin/lighttpd -f /etc/lighttpd.conf
日志文件包含以下错误:
2011-07-16 14:39:23: (log.c.166) server started
2011-07-16 14:39:23: (mod_fastcgi.c.1367) --- fastcgi spawning local
proc: /tmp/a.out
port: 0
socket /tmp/a.out.socket
max-procs: 4
2011-07-16 14:39:23: (mod_fastcgi.c.1391) --- fastcgi spawning
port: 0
socket /tmp/a.out.socket
current: 0 / 4
2011-07-16 14:39:23: (mod_fastcgi.c.978) bind failed for: unix:/tmp/a.out.socket-0 No such file or directory
2011-07-16 14:39:23: (mod_fastcgi.c.1399) [ERROR]: spawning fcgi failed.
2011-07-16 14:39:23: (server.c.938) Configuration of plugins failed. Going down.
我的配置有什么问题?我运行 OpenBSD 4.9。
提前非常感谢
Toru
/etc/lighttpd.conf:
...
server.modules = (
"mod_fastcgi"
)
server.username = "_lighttpd"
server.groupname = "_lighttpd"
fastcgi.server = (
".fcgi" =>
((
"socket" => "/tmp/a.out.socket",
"bin-path" => "/tmp/a.out"
))
)
...
I run as root:
spawn-fcgi -s /tmp/a.out.socket -n -u _lighttpd -g _lighttpd -U _lighttpd -G _lighttpd -- /tmp/a.out
ps aux:
...
_lighttpd 28973 0.0 0.2 448 596 p1 I+ 2:33PM 0:00.01 /tmp/a.out
...
ls -ltr /tmp
-rwxr-xr-x 1 _lighttpd _lighttpd 6992 Jul 16 13:38 a.out
srwxr-xr-x 1 _lighttpd _lighttpd 0 Jul 16 14:33 a.out.socket
Now I try to start lighttpd as root:
/usr/local/sbin/lighttpd -f /etc/lighttpd.conf
The logfile contains the following error:
2011-07-16 14:39:23: (log.c.166) server started
2011-07-16 14:39:23: (mod_fastcgi.c.1367) --- fastcgi spawning local
proc: /tmp/a.out
port: 0
socket /tmp/a.out.socket
max-procs: 4
2011-07-16 14:39:23: (mod_fastcgi.c.1391) --- fastcgi spawning
port: 0
socket /tmp/a.out.socket
current: 0 / 4
2011-07-16 14:39:23: (mod_fastcgi.c.978) bind failed for: unix:/tmp/a.out.socket-0 No such file or directory
2011-07-16 14:39:23: (mod_fastcgi.c.1399) [ERROR]: spawning fcgi failed.
2011-07-16 14:39:23: (server.c.938) Configuration of plugins failed. Going down.
What is wrong with my configuration? I run OpenBSD 4.9.
Many thanks in advance
Toru
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Lighttpd 已 chroot。要解决上述问题,请在 /etc/lighttpd.conf 中注释掉“server.chroot”。
Lighttpd is chrooted. To solve the problem described above comment out "server.chroot" in /etc/lighttpd.conf.