Mod_proxy_http can not be enabled

apache-2.4mod-proxyreverse-proxy

I have the current proxy modules enabled and working fine:

$ apache2ctl -M | grep proxy
 proxy_module (shared)
 proxy_fcgi_module (shared)

When I enable mod_proxy_http with a2enmod proxy_http and service apache2 restart, apache returns an error as if mod_proxy was not enabled:

oct 16 10:55:45 apachectl[15243]: apache2: Syntax error on
line 140 of /etc/apache2/apache2.conf: Syntax error on line 2 of
/etc/apache2/mods-enabled/proxy_http.load: Cannot load
/usr/lib/apache2/modules/mod_proxy_http.so into server:
/usr/lib/apache2/modules/mod_proxy_http.so: undefined symbol:
ap_proxy_check_connection

ap_proxy_check_connection is a mod_proxy.h method https://ci.apache.org/projects/httpd/trunk/doxygen/group__MOD__PROXY.html#ga618c0e1bede21bdd3af5d6a802671cae

Maybe some problem on module order load?

Thanks.

UPDATE: After add LoadModule mod_proxy before IncludeOptional directive, the problem is same.

$ vi /etc/apache2/apache2.conf

Include /etc/apache2/mods-available/proxy.load
Include /etc/apache2/mods-available/proxy.conf

# Include module configuration:
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf

$ apache2ctl -M | grep proxy

[Mon Oct 16 11:14:00.205439 2017] [so:warn] [pid 19944] AH01574: module proxy_module is already loaded, skipping
 proxy_module (shared)
 proxy_fcgi_module (shared)

$ a2enmod proxy_http

Considering dependency proxy for proxy_http:
Module proxy already enabled
Enabling module proxy_http.
To activate the new configuration, you need to run:
  systemctl restart apache2

$ apache2ctl -M | grep proxy

[Mon Oct 16 11:14:11.256292 2017] [so:warn] [pid 20006] AH01574: module proxy_module is already loaded, skipping
apache2: Syntax error on line 142 of /etc/apache2/apache2.conf: Syntax error on line 2 of /etc/apache2/mods-enabled/proxy_http.load: Cannot load /usr/lib/apache2/modules/mod_proxy_http.so into server: /usr/lib/apache2/modules/mod_proxy_http.so: undefined symbol: ap_proxy_check_connection

Best Answer

This might be due to dist-upgrade. Please check Plesk support articles -

Put this after the other LoadModule directives

LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
Related Topic