Ferrets家的Wordpress

杂记

Day: 2012年3月20日

Lighttpd开启/关闭目录浏览

2012年3月20日 by Ferrets Leave a Comment

原文地址:http://hi.baidu.com/panzhiqi/blog/item/3e66abad0d489d0c4a36d624.html

相当于apache 中的 Options Indexes功能
编辑 lighttpd.conf

  1. 开启所有目录的目录浏览
dir-listing.activate = "enable"
  1. 开启特定目录的目录浏览
$HTTP["url"] =~ "^/upload($|/)" {
dir-listing.activate = "enable"
}
  1. 开启所有目录,关闭特定目录的目录浏览
dir-listing.activate = "enable"
$HTTP["url"] =~ "^/www($|/)" {
dir-listing.activate = "disable"
}
Posted in: 搭建服务 Tagged: Lighttpd

在CentOS上安装NetworkManager-pptp

2012年3月20日 by Ferrets Leave a Comment

嗯,因为换了CentOS,所以在设置VPN的时候也出问题了,发现根本没有添加VPN的选项(Ubuntu在这方面做的好多了),于是上网各种查。

得到的参考有很多,不过都说到了一个软件包 NetworkManager-pptp

这个就是关键了

找遍了Google,大多数教程都指向一个网址“”,结果一查询,发现根本没有这个域名……真是坑爹啊。

最后还有老实人好,有个博客指出了一个可用的ftp服务器“ftp://mirror.switch.ch/“,还是找到了想要的软件包。

装完  NetworkManager-pptp之后,重启(不知道为何,我装了很多东西都要重启)就能在网络管理器那里添加pptp的VPN了。

Posted in: Linux Tagged: CentOS, PPTP, VPN

因权限造成lighttpd无法启动

2012年3月20日 by Ferrets Leave a Comment

最近不知道为什么lighttpd又跑不动了(当然不是VPS上的,而是路由上的) ,运行

lighttpd -f /etc/lighttpd/lighttpd.conf -D

得到了下面这堆奇怪的结果

2012-3-20 13:55:54: (log.c.172) server started
2012-3-20 13:55:54: (mod_fastcgi.c.1087) the fastcgi-backend /usr/bin/php-fcgi failed to start:
2012-3-20 13:55:54: (mod_fastcgi.c.1091) child exited with status 13 /usr/bin/php-fcgi
2012-3-20 13:55:54: (mod_fastcgi.c.1094) If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version.
If this is PHP on Gentoo, add 'fastcgi' to the USE flags.
2012-3-20 13:55:54: (mod_fastcgi.c.1398) [ERROR]: spawning fcgi failed.
2012-3-20 13:55:54: (server.c.928) Configuration of plugins failed. Going down.

接着就无法启动了……

我擦勒,不带这样玩的啊喂,这种莫名其妙的东西是什么啊,到底是什么问题你说一下啊。不得已,只得在网上不断的搜索,都没有相关的资料……最后从某个英文的网站找到了一个指引(明灯啊!)strace

大概是一个调试的东东,在opkg的info里面的介绍是“A useful diagnostic, instructional, and debugging tool. Allows you to track whatsystem calls a program makes while it is running.”

接着我根据那位大神所说的,运行了一次

strace -ff lighttpd -D -f /etc/lighttpd/lighttpd.conf

结果出来了一大串一大串文字,刷屏了,而且看不到头。不过看到了一个很重要的信息

运行/usr/bin/php-fcgi的时候出现了“permission denied”。嗯?有问题?权限的话是755,应该没问题啊,尝试直接用root来运行lighttpd,报告说不能用root来运行。于是又新建了一个www-data的用户来运行,在用su切换账户的时候发现问题了。这个问题之前也提到过,于是就顺手改了过来。接着切换过去一运行/usr/bin/php-fcgi,没问题了。再运行lighttpd,也没问题了……

这可真蛋疼啊,明明之前的版本都可以直接用其他用户来运行的,现在的话还有自己动手。

Posted in: Linux, OpenWrt, 搭建服务 Tagged: Lighttpd, OpenWrt, strace

搜索站点

日历

2012年 3月
一二三四五六日
 1234
567891011
12131415161718
19202122232425
262728293031 
« 2月   4月 »

分类

  • Android
  • docker
  • Linux
  • OpenWrt
  • PHP
  • Proxmox
  • RaspberryPi
  • RouterOS
  • Windows
  • 吐槽
  • 搭建服务
  • 未分类
  • 生活
  • 网络

近期文章

  • Proxmox中LXC容器中docker调用宿主机的显卡加速
  • Linux上iptables端口触发拦截
  • 通过DHCP指定mtu
  • openwrt 国内镜像源
  • 为RDP启用显卡加速,提升远程桌面效果
  • 为proxmox启用intel核显的虚拟化
  • windows无法解析域名
  • 在openwrt路由上运行shairplay作为远程音箱
  • 建立私有docker镜像源
  • RouterOS上抵挡扫描的防火墙策略

友链

  • ntzyz's space
  • Openwrt中文论坛
  • SNGR
  • Trevikids行止由心
  • 煎蛋

归档

管理

  • 登录
  • 条目feed
  • 评论feed
  • WordPress.org

Copyright © 2022 Ferrets家的Wordpress.

Omega WordPress Theme by ThemeHall