Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apache2 forward proxy #5166

Closed
jlarry3 opened this issue Apr 17, 2020 · 4 comments
Closed

apache2 forward proxy #5166

jlarry3 opened this issue Apr 17, 2020 · 4 comments
Labels
bug report Something is not working properly help wanted Help is wanted in order to solve the issue

Comments

@jlarry3
Copy link

jlarry3 commented Apr 17, 2020

Problem description
on Android 10 running apache2, module mod_proxy loads OK, but mod_proxy_http, mod_proxy_connect, and mod_proxy_ftp will not load because they cannot find certain symbols:

httpd: Syntax error on line 129 of /data/data/com.termux/files/usr/etc/apache2/httpd.conf: Cannot load libexec/apache2/mod_proxy_http.so into server: dlopen failed: cannot locate symbol "ap_proxy_cookie_reverse_map" referenced by "/data/data/com.termux/files/usr/libexec/apache2/mod_proxy_http.so"...

httpd: Syntax error on line 129 of /data/data/com.termux/files/usr/etc/apache2/httpd.conf: Cannot load libexec/apache2/mod_proxy_connect.so into server: dlopen failed: cannot locate symbol "proxy_hook_scheme_handler" referenced by "/data/data/com.termux/files/usr/libexec/apache2/mod_proxy_connect.so"...

httpd: Syntax error on line 129 of /data/data/com.termux/files/usr/etc/apache2/httpd.conf: Cannot load libexec/apache2/mod_proxy_ftp.so into server: dlopen failed: cannot locate symbol "proxy_hook_scheme_handler" referenced by "/data/data/com.termux/files/usr/libexec/apache2/mod_proxy_ftp.so"...

You get one message, for whichever module is first in httpd.conf.

httpd -V gives:
Server version: Apache/2.4.43 (Unix)
Server built: Apr 3 2020 15:39:28
Server's Module Magic Number: 20120211:92
Server loaded: APR 1.7.0, APR-UTIL 1.6.1
Compiled using: APR 1.7.0, APR-UTIL 1.6.1
Architecture: 64-bit
Server MPM: worker
threaded: yes (fixed thread count)
forked: yes (variable process count)
Server compiled with....
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_FCNTL_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=256
-D HTTPD_ROOT="/data/data/com.termux/files/usr"
-D SUEXEC_BIN="/data/data/com.termux/files/usr/bin/suexec"
-D DEFAULT_PIDLOG="var/run/apache2/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="etc/apache2/mime.types"
-D SERVER_CONFIG_FILE="etc/apache2/httpd.conf"

uname -a
Linux localhost 4.14.117-18242889 #2 SMP PREEMPT Fri Mar 20 20:23:00 KST 2020 aarch64 Android

To reproduce error:

install and start apache2
cd data/data/com.termux/files/usr/etc/apache2
edit httpd.conf:
remove '#' in front of each of these lines:

LoadModule proxy_module libexec/apache2/mod_proxy.so
LoadModule proxy_ftp_module libexec/apache2/mod_proxy_ftp.so
LoadModule proxy_connect_module libexec/apache2/mod_proxy_connect.so
LoadModule proxy_http_module libexec/apache2/mod_proxy_http.so

execute apachectl restart

Expected behavior

Expect no error messages and modules get loaded

Additional information

$ termux-info
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://termux.org/packages/ stable main
# root-repo (sources.list.d/root.list)
deb https://dl.bintray.com/grimler/termux-root-packages-24 root stable
# game-repo (sources.list.d/game.list)
deb https://dl.bintray.com/grimler/game-packages-24 games stable
# science-repo (sources.list.d/science.list)
deb https://dl.bintray.com/grimler/science-packages-24 science stable
Updatable packages:
All packages up to date
Android version:
10
Kernel build information:
Linux localhost 4.14.117-18242889 #2 SMP PREEMPT Fri Mar 20 20:23:00 KST 2020 aarch64 Android
Device manufacturer:
samsung
Device model:
SM-G970U

@ghost ghost added the bug report Something is not working properly label Apr 17, 2020
@ghost ghost added the help wanted Help is wanted in order to solve the issue label May 7, 2020
@mks-h
Copy link

mks-h commented Jul 21, 2020

Something similar for mod_proxy_fcgi.so

httpd: Syntax error on line 27 of /data/data/com.termux/files/usr/etc/apache2/httpd.conf: Cannot load libexec/apache2/mod_proxy_fcgi.so into server: dlopen failed: cannot locate symbol "proxy_module" referenced by "/data/data/com.termux/files/usr/libexec/apache2/mod_proxy_fcgi.so"...

Mine system is LineageOS 17.1 (Android 10).

Packages CPU architecture:
aarch64
All packages up to date
Android version:
10
Kernel build information:
Linux localhost 4.4.205-gae9fcc9 #1 SMP PREEMPT Tue Jul 14 06:04:05 UTC 2020 aarch64 Android
Device manufacturer:
Sony
Device model:
I4113


Server version: Apache/2.4.43 (Unix)
Server built:   Apr  3 2020 15:39:28
Server's Module Magic Number: 20120211:92
Server loaded:  APR 1.7.0, APR-UTIL 1.6.1
Compiled using: APR 1.7.0, APR-UTIL 1.6.1
Architecture:   64-bit
Server MPM:     worker
  threaded:     yes (fixed thread count)
    forked:     yes (variable process count)
Server compiled with....
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_FCNTL_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=256
 -D HTTPD_ROOT="/data/data/com.termux/files/usr"
 -D SUEXEC_BIN="/data/data/com.termux/files/usr/bin/suexec"
 -D DEFAULT_PIDLOG="var/run/apache2/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="etc/apache2/mime.types"
 -D SERVER_CONFIG_FILE="etc/apache2/httpd.conf"

@Grimler91
Copy link
Member

I am closing this in favor of issue #2479 so that we are tracking this in a single issue. This type of issue happens for quite a few plugins, one workaround is to export LD_PRELOAD=$PREFIX/libexec/apache2/mod_proxy.so before starting httpd.

I am using a termux-services script containing

#!/data/data/com.termux/files/usr/bin/sh
export LD_PRELOAD=$PREFIX/libexec/apache2/mod_proxy.so
exec httpd -f $HOME/apache2/httpd.conf -DNO_DETACH 2>&1

to workaround this issue.

@tinboyko
Copy link

Same issue for me.

Official rom
Redmi note 4x
Android 7

After applying your workaround getting next error [Tue Jul 21 13:47:01.280933 2020] [proxy:warn] [pid 11778] [client 192.168.43.131:49252] AH01144: No protocol handler was valid for the URL / (scheme 'http'). If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.

@Grimler91
Copy link
Member

After applying your workaround getting next error

That's a warning, not an error. Try changing your config file as per the message to silence it

@ghost ghost locked and limited conversation to collaborators Oct 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug report Something is not working properly help wanted Help is wanted in order to solve the issue
Projects
None yet
Development

No branches or pull requests

4 participants