AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 542455
Accepted
Pradeep Gupta
Pradeep Gupta
Asked: 2013-09-30 04:02:21 +0800 CST2013-09-30 04:02:21 +0800 CST 2013-09-30 04:02:21 +0800 CST

在 Lighttpd 上启用用户目录后,我在重新启动 Lighttpd 服务器后失败了

  • 772

我使用 Debian 7 64 作为主机,并安装了支持 mysql 的 Lighttpd 和 PHP-FPM,全新安装 lighttpd 和 PHP-FPM 后,我尝试启用用户目录并运行以下命令:

[email protected]# lighty-enable-mod userdir

运行上面的命令后我得到了 Ok messege,但是当我运行下面的命令重新启动 lig​​httpd 时,我得到以下输出:

[email protected]# /etc/init.d/lighttpd force-reload
[FAIL] Reloading web server configuration: lighttpd failed!

我想打开 /home/user/www/project_name; 当有人打开我的网站时;像这样:www.mysite.com/project_name,所以我在 /etc/lighttpd/conf-available/10-userdir.conf 上做了以下更改

## The userdir module provides a simple way to link user-based directories into
## the global namespace of the webserver.
##
# /usr/share/doc/lighttpd/userdir.txt

server.modules      += ( "mod_userdir" )

## the subdirectory of a user's home dir which should be accessible
## under http://$host/~$user
userdir.path         = "/www/project_name/public_html"

## The users whose home directories should not be accessible
userdir.exclude-user = ( "root", "postmaster" )

以下是 /var/log/lighttpd/error.log 文件的输出。

2013-09-29 10:25:57: (log.c.166) server started 2013-09-29 10:44:57: (server.c.1430)     [note] graceful shutdown started 
2013-09-29 10:44:57: (log.c.166) server started 
2013-09-29 10:44:57:(mod_fastcgi.c.977) bind failed for: unix:/var/run/php5-fpm.sock-0 Permission denied         
2013-09-29 10:44:57: (mod_fastcgi.c.1397) [ERROR]: spawning fcgi failed. 
2013-09-29 10:44:57: (server.c.964) Configuration of plugins failed. Going down. 
2013-09-29 10:44:57: (server.c.1546) server stopped by UID = 0 PID = 5841 
2013-09-29 12:59:58: (log.c.166) server started 
2013-09-29 12:59:58: (mod_fastcgi.c.977) bind failed for: unix:/var/run/php5-fpm.sock-0 Permission denied         
2013-09-29 12:59:58: (mod_fastcgi.c.1397) [ERROR]: spawning fcgi failed. 
2013-09-29 12:59:58: (server.c.964) Configuration of plugins failed. Going down.

我无法解决问题并寻找解决方案。

php-fpm
  • 1 1 个回答
  • 1755 Views

1 个回答

  • Voted
  1. Best Answer
    Stefan
    2013-09-30T23:27:38+08:002013-09-30T23:27:38+08:00

    lighttpd 无法写入/var/run,并且绑定到 unix 套接字总是会创建一个新文件(更改现有文件的权限无济于事)。

    /var/run不是/tmp- 只有 root 应该能够写入。如果您希望 lighttpd 创建套接字文件,请使用 lighttpd 拥有的目录(/tmp这也是一个坏主意!)

    此外,您似乎正在使用 php-fpm:您无法从 lighttpd 生成 php-fpm,请删除“bin-path”选项。php-fpm 通常通过 init 脚本(或类似脚本)生成,并为每个用户创建套接字,并为其生成 php 后端(每个用户都有自己的套接字)。

    • 0

相关问题

  • 不小心将 chown “root” 设置为我所有的服务器

  • Nginx + PHP-FPM = "随机" 502 错误网关

  • PHP-FPM + NGINX:PHP-CGI 进程在空闲一段时间后死亡,然后 502 bad gateway 和需要手动重启

  • 如何使程序从源代码保持最新?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve