全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

IP归属甄别会员请立即修改密码
查看: 2321|回复: 22
打印 上一主题 下一主题

天下文章一大抄

[复制链接]
跳转到指定楼层
1#
发表于 2009-10-7 13:46:55 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
想搜索一下lighttpd是否支持open_basedir
Google一下,晕,全部都是同一个结果,各个网站抄来抄去,但都不是我要的结果

一个可能的结果是:lighttpd和nginx一样,可以为“同一php进程运行的所有网站”设置open_basedir,但不能单独为每个网站设置不同的open_basedir
2#
发表于 2009-10-7 13:53:59 | 只看该作者

回复 1# 的帖子

为每个网站设置不同的open_basedir

这就前提需要每个网站使用不同的php.ini了吧。
3#
发表于 2009-10-7 14:01:58 | 只看该作者
/var/www/
/vhost1/
       /php/
         /php-wrapper.sh
         /php.ini
         /webroot/
/vhost2/
         /php/
          /php-wrapper.sh
          /php.ini
         /webroot/
4#
发表于 2009-10-7 14:02:05 | 只看该作者
这样子吗?
5#
发表于 2009-10-7 14:13:40 | 只看该作者

回复 3# 的帖子

你这是每个网站使用一个自己的php.ini ?
6#
发表于 2009-10-7 14:31:52 | 只看该作者
对啊~~~~~我在某网站看到的
7#
 楼主| 发表于 2009-10-7 14:40:15 | 只看该作者
原帖由 pigicoffee 于 2009-10-7 14:01 发表
/var/www/
/vhost1/
       /php/
         /php-wrapper.sh
         /php.ini
         /webroot/
/vhost2/
         /php/
          /php-wrapper.sh
          /php.ini
         /webroot/ ...

怎样实现?
8#
 楼主| 发表于 2009-10-7 14:40:48 | 只看该作者
原帖由 cpuer 于 2009-10-7 13:53 发表
为每个网站设置不同的open_basedir

这就前提需要每个网站使用不同的php.ini了吧。

不需要每个网站用不同的php.ini,只要每个网站用不同的php进程就行
9#
发表于 2009-10-7 14:50:15 | 只看该作者
I use exactly this approach with lighttpd:
Different vhosts use different fastcgi php handlers (using sockets) - and those php handlers all use different rights that fit the current vhost. My Layout is like this:
  • /var/www/
  • /vhost1/
    • /php/
      • /php-wrapper.sh
      • /php.ini
    • /webroot/
  • /vhost2/
    • /php/
      • /php-wrapper.sh
      • /php.ini
    • /webroot/
That allows me to have a different ini file for every vhost - with different open_basedir restrictions. Is this what you want? Yes, your integrated solution (chroot) would be even nicer, but maybe my solution can help you until there's a better way?
10#
发表于 2009-10-7 14:57:39 | 只看该作者

回复 9# 的帖子

lighttpd的
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2025-11-10 18:41 , Processed in 0.083814 second(s), 7 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表