Reputation: 589
Recently I need integrate a websocket server with apache2,and I find that apache2.4 has supported websocket with the module : mod_proxy_wstunnel
.
http://httpd.apache.org/docs/2.4/mod/mod_proxy_wstunnel.html
I compiled them by myself, but encountered a problem :
httpd: Syntax error on line 122 of /usr/local/apache2/conf/httpd.conf: Cannot load modules/mod_proxy_wstunnel.so into server: /usr/local/apache2/modules/mod_proxy_wstunnel.so: undefined symbol: ap_proxy_release_connection
My steps are:
apr-1.5.2.tar.gz
apr-util-1.5.4.tar.gz
/httpd-2.4.23/srclib
tar -zvf apr-1.5.2.tar.gz
tar -zvf apr-util-1.5.4.tar.gz
apr-1.5.2
as apr
apr-util-1.5.4
as apr-util
yum install pcre-devel
./configure --enable-so --enable-http --enable-proxy --enable-proxy-http --with-included-apr --enable-proxy-wstunnel
vi /usr/local/apache2/conf/httpd.conf
ServerName 127.0.0.1<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
Above is my steps. Then I try to start my apache2 :
/usr/local/apache2/bin/apachectl start
Got the following errors:
httpd: Syntax error on line 122 of /usr/local/apache2/conf/httpd.conf: Cannot load modules/mod_proxy_wstunnel.so into server: /usr/local/apache2/modules/mod_proxy_wstunnel.so: undefined symbol: ap_proxy_release_connection
I have google it , but can't find some helpful info.
Upvotes: 4
Views: 6852
Reputation: 336
You need to load mod_proxy as well as mod_proxy_wstunnel. If you load an underlying proxy module (http/fcgi/ajp/wstunnel) without mod_proxy you will get this error.
So check your configuration and make sure you have a LoadModule
directive for mod_proxy as well as mod_proxy_wstunnel.
You can also use the output of apachectl -M
to check the modules Apache is loading.
Upvotes: 5