我已经安装了前一段时间的Apache和PHP作为FastCGI模块open_basedir的用于运行PHP的FastCGI为
[email protected]# apt-get install apache2 apache2-suexec libapache2-mod-fcgid php5-cgi
[email protected]# dpkg-query -l '*apache2*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============================-==============================-============================================================================
ii apache2 2.2.20-1ubuntu1.2 Apache HTTP Server metapackage
ii apache2-mpm-worker 2.2.20-1ubuntu1.2 Apache HTTP Server - high speed threaded model
ii apache2-suexec 2.2.20-1ubuntu1.2 Standard suexec program for Apache 2 mod_suexec
ii apache2-utils 2.2.20-1ubuntu1.2 utility programs for webservers
ii apache2.2-bin 2.2.20-1ubuntu1.2 Apache HTTP Server common binary files
ii apache2.2-common 2.2.20-1ubuntu1.2 Apache HTTP Server common files
ii libapache2-mod-fcgid 1:2.3.6-1+squeeze1build0.11.10 an alternative module compat with mod_fastcgi
[email protected]# dpkg-query -l '*php*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-=================================-=================================-==================================================================================
un php-pear <none> (no description available)
ii php5-cgi 5.3.6-13ubuntu3.7 server-side, HTML-embedded scripting language (CGI binary)
ii php5-common 5.3.6-13ubuntu3.7 Common files for packages built from the php5 source
un php5-json <none> (no description available)
un php5-mhash <none> (no description available)
un php5-suhosin <none> (no description available)
un phpapi-20090626 <none> (no description available)
[email protected]# dpkg-query -l '*fcgi*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-=================================-=================================-==================================================================================
ii libapache2-mod-fcgid 1:2.3.6-1+squeeze1build0.11.10.1 an alternative module compat with mod_fastcgi
现在,我知道,我不能在我的虚拟主机使用这个命令:
php_admin_value open_basedir "/var/www/users/test"
在我的情况下,一般的虚拟主机文件:
1)任何想法如何启用open_basedir
一个nd也允许我的用户更改我在家中定义的php.ini
(例如, /var/www/users/test
)。即使用户尝试编辑php.ini
,用户也不应该改变我的价值。
这可能吗? 或者,我应该忘记用户访问我的所有用户的php.ini
,并且一次性更改他的php.ini
?(我可以通过简单地重新定位来实现这一点 - 您知道这样的设置中有一个fcgid包装脚本)
2)我将不胜感激,如果任何人也可以给我重定向所有请求一些Apache2的指令:
http://www.test.com/a/new/post
这一个内部:
http://www.test.com/index.php?a/new/post
下不工作,应给一些参数ETERS:
RewriteEngine On
RewriteBase/
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
(不,我不希望允许速度的原因.htaccess文件)
谢谢!
评论对问题(2):我注意到,该指令的<Directory>
部分内实现我需要什么:
RewriteEngine On
RewriteBase/
RewriteRule ^(.*)$ index.php?$1 [NC,L,QSA]
但在(未显示)
呈现PHP图片奇怪的行为<?php
phpinfo();
?>
这种形象在呼应文件的链接是
<img border="0" src="/info.php?=PHPE9568F34-D428-11d2-A769-00AA001ACF42" alt="PHP Logo" />
有什么想法?
你确定你应该有其他人,因为用户在Web服务器上,如果你不知道如何管理/正确配置吗......? – CBroe 2013-03-20 13:21:17
那么你有什么建议?管理是继承还是国籍? – centurian 2013-03-20 14:09:17