mod_proxy_http can not be enabled

9,646

Solution 1

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

Solution 2

Sounds like the problem as described here. To fix:

apt-get purge libapache2-mod-proxy-psa
a2dismod proxy
a2enmod proxy proxy_fcgi
systemctl restart apache2
Share:
9,646

Related videos on Youtube

Lito
Author by

Lito

Updated on September 18, 2022

Comments

  • Lito
    Lito almost 2 years

    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
    
    • c4f4t0r
      c4f4t0r over 6 years
      a2enmod proxy && a2enmod proxy_http
    • Lito
      Lito over 6 years
      Same probem: $ a2enmod proxy && a2enmod proxy_http && service apache2 restart: 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
    • c4f4t0r
      c4f4t0r over 6 years
      how did you installed your apache?
    • Lito
      Lito over 6 years
      It's a Plesk installation. Enabling http proxy module from Plesk panel the error is the same.
    • c4f4t0r
      c4f4t0r over 6 years
      if you are using any hosting provider, open a ticket with this error "undefined symbol: ap_proxy_check_connection
    • Lito
      Lito over 6 years
      Yes, but it's strange. A google search with "undefined symbol: ap_proxy_check_connection" returns only one result, this question. Thanks anyway.