这是我的 apache2.2 的虚拟主机,我想配置它来连接 php7.1 php-fpm,出现 apache 错误
SuexecUserGroup "#504" "#504"
ServerName test.example.com
ServerAlias www.test.example.com
ServerAlias webmail.test.example.com
ServerAlias admin.test.example.com
DocumentRoot /home/test/public_html
ErrorLog /var/log/virtualmin/test.example.com_error_log
CustomLog /var/log/virtualmin/test.example.com_access_log combined
ScriptAlias /cgi-bin/ /home/test/cgi-bin/
ScriptAlias /awstats/ /home/test/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/test/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>
<Directory /home/test/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.test.example.com
RewriteRule ^(.*) https://test.example.com:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.test.example.com
RewriteRule ^(.*) https://test.example.com:10000/ [R]
ProxyPassMatch ^/(.*.php(/.*)?)$ fcgi://127.0.0.1:9000/home/test/public_html/$1
#RemoveHandler .php
RemoveHandler .php5
php_admin_value engine Off
Alias /dav /home/test/public_html
<Location /dav>
DAV on
AuthType Basic
AuthName "test.example.com"
AuthUserFile /home/test/etc/dav.digest.passwd
Require valid-user
ForceType text/plain
Satisfy All
RemoveHandler .php
RemoveHandler .php7.1
RewriteEngine off
</Location>
<Files awstats.pl>
AuthName "test.example.com statistics"
AuthType Basic
AuthUserFile /home/test/.awstats-htpasswd
require valid-user
</Files>
错误是
[Tue Apr 24 18:45:41 2018] [warn] proxy: No protocol handler was valid for the URL /phpinfo.php. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.
有人知道这是什么问题吗?
- - - - - - - 更新 - - - - - - - -
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_alias_module modules/mod_authn_alias.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule ldap_module modules/mod_ldap.so
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
LoadModule env_module modules/mod_env.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule info_module modules/mod_info.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule substitute_module modules/mod_substitute.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule cache_module modules/mod_cache.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule version_module modules/mod_version.so
答案1
好像你没有mod_proxy_http
启用。
尝试:sudo a2enmod proxy_http
并重新启动 Apache。
如果您使用的是 mod_proxy 的 DSO 版本,请尝试:LoadModule proxy_http_module modules/mod_proxy_http.so
答案2
刚发现缺少一个模块
yum install mod_proxy_fcgi