使用 fastcgi 和本地 unix 域套接字启动 lig​​httpd 失败

发布于 2024-11-25 00:25:11 字数 1529 浏览 2 评论 0原文

/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 身份启动 lig​​httpd:

/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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

音盲 2024-12-02 00:25:11

Lighttpd 已 chroot。要解决上述问题,请在 /etc/lighttpd.conf 中注释掉“server.chroot”。

Lighttpd is chrooted. To solve the problem described above comment out "server.chroot" in /etc/lighttpd.conf.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文