小编pap*_*asj的帖子

debian中的apache2.4 + php-fpm + phpmyadmin

我在debian中设置了这个设置:apache 2.4 proxy_fcgi和php-fpm(v5.5).在我的虚拟主机文件中,我有:

<VirtualHost *:80>
DocumentRoot /var/www/html
ProxyPassMatch ^/(.*\.php(/.*)?)$ unix:/var/run/php5-fpm.sock|fcgi://./var/www/html
CustomLog ${APACHE_LOG_DIR}/access.log combined
ErrorLog ${APACHE_LOG_DIR}/error.log
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)

一切正常,我可以看到phpinfo()和我在/ var/www/html /下请求的每个php文件.

我继续从debian repo安装phpmyadmin但是当我浏览到http://MY.IP/phpmyadmin时,我收到"找不到文件"错误并在apache错误日志中

"[proxy_fcgi:error] AH01071: Got error 'Primary script unknown\n'"
Run Code Online (Sandbox Code Playgroud)

Debian phpmyadmin包将内容转储到/ usr/share/phpmyadmin.如果我在/ usr/share/phpmyadmin下创建一个test.html文件,我可以从http://MY.IP/phpmyadmin/test.html看到它的内容

问题是/ usr/share/phpmyadmin下的php文件没有被处理.phpmyadmin apache配置如下:

# phpMyAdmin default Apache configuration

Alias /phpmyadmin /usr/share/phpmyadmin

<Directory /usr/share/phpmyadmin>
        Options FollowSymLinks
        DirectoryIndex index.php

        <IfModule mod_php5.c>
                AddType application/x-httpd-php .php
                <FilesMatch ".+\.php$">
                    SetHandler application/x-httpd-php
                </FilesMatch>

                php_flag magic_quotes_gpc Off
                php_flag track_vars On
                php_flag register_globals Off
                php_admin_flag allow_url_fopen Off
                php_value include_path .
                php_admin_value upload_tmp_dir …
Run Code Online (Sandbox Code Playgroud)

php debian phpmyadmin apache2.4

10
推荐指数
2
解决办法
1万
查看次数

标签 统计

apache2.4 ×1

debian ×1

php ×1

phpmyadmin ×1