我有一个Debian Lenny网络服务器。它正在使用libriache2-mod-suphp运行apache2。不幸的是,suphp不可能使用phpmyadmin,因为phpmyadmin安装在/usr/share/phpmyadmin中,由root拥有,suphp在这个方向禁用它的引擎:
$ cat /etc/apache2/mods-enabled/suphp.conf
<IfModule mod_suphp.c>
AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml
suPHP_AddHandler application/x-httpd-php
<Directory />
suPHP_Engine on
</Directory>
# By default, disable suPHP for debian packaged web applications as files
# are owned by root and cannot be executed by suPHP because of min_uid.
<Directory /usr/share>
suPHP_Engine off
</Directory>
</IfModule>是否有可能在使用suphp时启用系统phpmyadmin (可能通过标准libriache2-mod-php5)?多么?
发布于 2010-12-13 07:43:54
In /etc/apache2/mods-现有/suphp.conf,以下两行:
AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml
suPHP_AddHandler application/x-httpd-php应改为:
AddType application/x-httpd-suphp .php .php3 .php4 .php5 .phtml
suPHP_AddHandler application/x-httpd-suphp然后,在/etc/suphp/suphp.conf行中
application/x-httpd-php=php:/usr/bin/php-cgi应改为:
application/x-httpd-suphp=php:/usr/bin/php-cgi然后,应将/etc/apache2/mods-现有/php5.conf的内容改为:
<IfModule mod_php5.c>
AddType application/x-httpd-php .php .phtml .php3
AddType application/x-httpd-php-source .phps
</IfModule>至:
<Directory /usr/share>
<IfModule mod_php5.c>
AddType application/x-httpd-php .php .phtml .php3
AddType application/x-httpd-php-source .phps
</IfModule>
</Directory>这样,所有php脚本都被分配给类型,由suphp处理。由于suphp对/usr/share中的文件禁用,在php5.conf中,php脚本将获得类型并由mod_php5处理。这样,除了/usr/share中的系统安装脚本外,您还可以为所有其他脚本保留suphp。
发布于 2012-08-19 21:22:34
fwiw on ubuntu 12.04我采取了以下步骤:
:/usr/share/phpmyadmin到/etc/suphp/suphp.conf中docroot的末尾
已添加
<Directory /usr/share/phpmyadmin>
suPHP_Engine on
</Directory>至/etc/apache2/mods-启用/suphp.conf
创建了一个新的虚拟主机
<VirtualHost *:80>
ServerName phpmyadmin.example.com
DocumentRoot /usr/share/phpmyadmin
DirectoryIndex index.php
<Directory /usr/share/phpmyadmin>
Options FollowSymLinks
</Directory>
<directory /usr/share/phpmyadmin/setup>
Order Deny,Allow
Deny from All
</directory>
<directory /usr/share/phpmyadmin/libraries>
Order Deny,Allow
Deny from All
</directory>
</VirtualHost>做
chown pmauser:pmauser /usr/share/phpmyadmin
chown pmauser:pmauser /usr/share/phpmyadmin/*.php
chmod og-r /usr/share/phpmyamdin
chmod og-r /usr/share/phpmyamdin/*.php这能让它大部分发挥作用。
我还没有弄清楚如何摆脱请求blowfish_secret的错误消息。Ubuntu将配置文件分散在几个目录中,它们的/etc/phpmyadmin/apache.conf拥有
php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/我不愿意将所有这些路径添加到suphp docroot,pma也不承认/usr/share/phpmyadmin/config.inc.php。
https://serverfault.com/questions/211935
复制相似问题