【发布时间】:2018-06-29 13:09:34
【问题描述】:
我一直试图让 apache2.4 虚拟主机将 php 请求传递给 php5-fpm。
我已将 php5-fpm 配置为侦听套接字,在 /etc/php5/fpm/pool.d/www.conf 中有这一行:
listen = /var/run/php5-fpm.sock
我在这台特定机器上配置的唯一虚拟主机是默认主机。这是我的配置方式:
<VirtualHost *:80>
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/default-error.log
CustomLog ${APACHE_LOG_DIR}/default-access.log combined
ProxyPassMatch ^/(.*\.php(/.*)?)$ unix:///var/run/php5-
fpm.sock|fcgi://127.0.0.1/var/www/html/
DirectoryIndex /index.php index.php
</VirtualHost>
配置完成后,我重新启动了 apache。对测试 php 文件的请求会在错误日志中产生此消息。
[client 10.0.2.2:51434] AH01144:没有协议处理程序对 网址 /info.php。如果您使用的是 DSO 版本的 mod_proxy,请确保 代理子模块包含在配置中,使用 加载模块。
我有理由确定我安装了正确的模块。 'apachectl -M' 返回以下内容:
Loaded Modules:
core_module (static)
so_module (static)
watchdog_module (static)
http_module (static)
log_config_module (static)
logio_module (static)
version_module (static)
unixd_module (static)
access_compat_module (shared)
actions_module (shared)
alias_module (shared)
auth_basic_module (shared)
authn_core_module (shared)
authn_file_module (shared)
authz_core_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
fastcgi_module (shared)
filter_module (shared)
mime_module (shared)
mpm_event_module (shared)
negotiation_module (shared)
proxy_module (shared)
proxy_fcgi_module (shared)
proxy_http_module (shared)
setenvif_module (shared)
status_module (shared)
我错过了什么?
【问题讨论】: