logo
Apache Lounge
Webmasters

 


About

Forum Index Downloads Search Register Log in  RSS Apache Lounge
 



Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.



Module of Apache proxy_wstunnel

 
Post new topic   Reply to topic    Apache Forum Index -> Apache



View previous topic :: View next topic  
Author Message
Zemond



Joined: 01 Aug 2017
Posts: 2
Location: Russia

PostPosted: Tue 01 Aug '17 18:25    Post subject: Module of Apache proxy_wstunnel Reply with quote

Hello!

I have a problem with proxy_wstunnel_module on Apache in my CentOS.

CentOS release 6.9 (Final)
Server version: Apache/2.4.12 (Unix)

I need install proxy_wstunnel_module, i read manual http://stackmirror.cn/page/s0ui2n9ay1bt
1) I download module with https://github.com/apache/httpd/tree/trunk/modules/proxy
2) I compile it using apxs -i -a -c mod_proxy_tunnel.c

I have many warning and error:

Code:
mod_proxy_tunnel.c: In function 'proxy_wstunnel_pump':
mod_proxy_tunnel.c:91: warning: implicit declaration of function 'ap_proxy_transfer_between_connections'
mod_proxy_tunnel.c: In function 'proxy_wstunnel_finish':
mod_proxy_tunnel.c:163: warning: implicit declaration of function 'ap_mpm_resume_suspended'
mod_proxy_tunnel.c: In function 'proxy_wstunnel_callback':
mod_proxy_tunnel.c:207: warning: implicit declaration of function 'ap_mpm_register_poll_callback_timeout'
mod_proxy_tunnel.c: In function 'proxy_wstunnel_canon':
mod_proxy_tunnel.c:235: warning: implicit declaration of function 'ap_cstr_casecmpn'
mod_proxy_tunnel.c: In function 'proxy_wstunnel_request':
mod_proxy_tunnel.c:317: error: 'proxy_worker_shared' has no member named 'upgrade'
mod_proxy_tunnel.c:317: error: 'proxy_worker_shared' has no member named 'upgrade'
mod_proxy_tunnel.c:330: warning: implicit declaration of function 'ap_cstr_casecmp'
mod_proxy_tunnel.c: In function 'proxy_wstunnel_handler':
mod_proxy_tunnel.c:463: error: 'proxy_worker_shared' has no member named 'upgrade'
mod_proxy_tunnel.c:463: error: 'proxy_worker_shared' has no member named 'upgrade'
mod_proxy_tunnel.c:521: warning: implicit declaration of function 'ap_proxy_connection_create_ex'
mod_proxy_tunnel.c: In function 'create_proxyws_dir_config':
mod_proxy_tunnel.c:547: error: 'AP_MPMQ_CAN_POLL' undeclared (first use in this function)
mod_proxy_tunnel.c:547: error: (Each undeclared identifier is reported only once
mod_proxy_tunnel.c:547: error: for each function it appears in.)
apxs:Error: Command failed with rc=65536



After that, i download ap_mpm.h and mod_proxy.h in directory with mod_proxy_tunnel.c

Compiling again:

Code:
apxs -i -a -c mod_proxy_tunnel.c
/usr/local/apache/build/libtool --silent --mode=compile gcc -std=gnu99 -prefer-pic -m64 -fPIC -DPIC  -DLINUX -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/local/apache/include  -I/usr/local/apache/include   -I/usr/local/apache/include   -c -o mod_proxy_tunnel.lo mod_proxy_tunnel.c && touch mod_proxy_tunnel.slo
mod_proxy_tunnel.c: In function 'proxy_wstunnel_canon':
mod_proxy_tunnel.c:235: warning: implicit declaration of function 'ap_cstr_casecmpn'
mod_proxy_tunnel.c: In function 'proxy_wstunnel_request':
mod_proxy_tunnel.c:330: warning: implicit declaration of function 'ap_cstr_casecmp'
/usr/local/apache/build/libtool --silent --mode=link gcc -std=gnu99 -L/usr/lib64   -o mod_proxy_tunnel.la  -rpath /usr/local/apache/modules -module -avoid-version    mod_proxy_tunnel.lo
/usr/local/apache/build/instdso.sh SH_LIBTOOL='/usr/local/apache/build/libtool' mod_proxy_tunnel.la /usr/local/apache/modules
/usr/local/apache/build/libtool
 --mode=install install mod_proxy_tunnel.la /usr/local/apache/modules/
libtool: install: install .libs/mod_proxy_tunnel.so /usr/local/apache/modules/mod_proxy_tunnel.so
libtool: install: install .libs/mod_proxy_tunnel.lai /usr/local/apache/modules/mod_proxy_tunnel.la
libtool: install: install .libs/mod_proxy_tunnel.a /usr/local/apache/modules/mod_proxy_tunnel.a
libtool: install: chmod 644 /usr/local/apache/modules/mod_proxy_tunnel.a
libtool: install: ranlib /usr/local/apache/modules/mod_proxy_tunnel.a
libtool: finish: PATH="/usr/local/jdk/bin:/usr/local/sbin:/usr/local/bin:/sbin:
/bin:/usr/sbin:/usr/bin:/opt/cpanel/composer/bin:/usr/local/easy/bin:/usr/local/bin:
/usr/X11R6/bin:/root/bin:/sbin" ldconfig -n /usr/local/apache/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/apache/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
chmod 755 /usr/local/apache/modules/mod_proxy_tunnel.so
[activating module `proxy_wstunnel' in /usr/local/apache/conf/httpd.conf]



3) I try looked modules included in my config:

Code:
httpd -M
httpd: Syntax error on line 35 of /usr/local/apache/conf/httpd.conf: Cannot load modules/mod_proxy_tunnel.so into server: /usr/local/apache/modules/mod_proxy_tunnel.so: undefined symbol: ap_mpm_register_poll_callback_timeout



How decide this problem?
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2101
Location: Sun Diego, USA

PostPosted: Tue 01 Aug '17 19:20    Post subject: Reply with quote

I'd think you should be using the module source from the 2.4 branch instead of trunk.

https://raw.githubusercontent.com/apache/httpd/2.4.x/modules/proxy/mod_proxy_wstunnel.c

Come to think of it, you don't want ap_mpm.h or mod_proxy.h from trunk either. If you've lost your originals then get new ones from the 2.4 branch also.
Back to top
Zemond



Joined: 01 Aug 2017
Posts: 2
Location: Russia

PostPosted: Tue 01 Aug '17 21:13    Post subject: Reply with quote

You're right!

I was downloaded all files of 2.4.12 from http://www.linuxfromscratch.org/blfs/view/7.7/server/apache.html and after that compiled module is work.

Thanh! Your advice was very useful to me!
Back to top


Post new topic   Reply to topic    Apache Forum Index -> Apache
Page 1 of 1