无法将模块/mod_proxy_wstunnel.so 加载到服务器中 [英] Cannot load modules/mod_proxy_wstunnel.so into server

查看:55
本文介绍了无法将模块/mod_proxy_wstunnel.so 加载到服务器中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我需要集成一个websocket服务器和apache2,发现apache2.4已经支持websocket模块了:mod_proxy_wstunnel.http://httpd.apache.org/docs/2.4/mod/mod_proxy_wstunnel.html

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:/usr/local/apache2/conf/httpd.conf 的第 122 行语法错误:无法将 modules/mod_proxy_wstunnel.so 加载到服务器:/usr/local/apache2/modules/mod_proxy_wstunnel.so:未定义符号:ap_proxy_release_connection

  • 环境信息:
  • 操作系统:centos 6.8
  • php:php-7.0.10
  • apache:httpd-2.4.23

我的步骤是:

  1. 下载源代码.
    • php7 github.com/php/php-src/releases/tag/php-7.0.10
    • apache2.4 github.com/apache/httpd/releases/tag/2.4.23
  • shell> tar -xjf php-7.0.10.tar.bz2
  • shell> tar -xjf httpd-2.4.23.tar.bz2
  • 下apr: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 asapr-util
  • 安装pcre
    yum install pcre-devel
  • ./configure --enable-so --enable-http --enable-proxy --enable-proxy-http --with-included-apr --enable-proxy-wstunnel
  • 制作&&进行安装
  • 设置apache服务器ip:
    shell> vi/usr/local/apache2/conf/httpd.conf服务器名称 127.0.0.1
  • down apr:apr-1.5.2.tar.gz apr-util-1.5.4.tar.gz
  • copy to /httpd-2.4.23/srclib
    tar -zvf apr-1.5.2.tar.gz tar -zvf apr-util-1.5.4.tar.gz
  • Modify the files name:
    apr-1.5.2 as apr
    apr-util-1.5.4 as apr-util
  • Install pcre
    yum install pcre-devel
  • ./configure --enable-so --enable-http --enable-proxy --enable-proxy-http --with-included-apr --enable-proxy-wstunnel
  • make && make install
  • set apache server ip:
    shell> vi /usr/local/apache2/conf/httpd.conf ServerName 127.0.0.1
  • libxml2:
    yum install libxml2-devel
  • mkdir/usr/local/php7
  • ./configure --prefix=/usr/local/php7 --with-mysqli --enable-mysqlnd --with-mysql-sock=/var/lib/mysql/mysql.sock --with-apxs2=/usr/local/apache2/bin/apxs
  • 制作&&进行安装
  • cp -v ./php.ini-production/usr/local/php7/lib/php.ini
  • 配置httpd.conf
    shell> vi/usr/local/apache2/conf/httpd.conf
    <代码>SetHandler 应用程序/x-httpd-php</FilesMatch>

以上是我的步骤.然后我尝试启动我的 apache2 :

Above is my steps. Then I try to start my apache2 :

/usr/local/apache2/bin/apachectl start

出现以下错误:

httpd:/usr/local/apache2/conf/httpd.conf 的第 122 行语法错误:无法将 modules/mod_proxy_wstunnel.so 加载到服务器:/usr/local/apache2/modules/mod_proxy_wstunnel.so:未定义符号:ap_proxy_release_connection

我用谷歌搜索过,但找不到一些有用的信息.

I have google it , but can't find some helpful info.

推荐答案

您需要加载 mod_proxy 和 mod_proxy_wstunnel.如果您在没有 mod_proxy 的情况下加载底层代理模块 (http/fcgi/ajp/wstunnel),您将收到此错误.

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.

因此请检查您的配置并确保您有一个用于 mod_proxy 和 mod_proxy_wstunnel 的 LoadModule 指令.

So check your configuration and make sure you have a LoadModule directive for mod_proxy as well as mod_proxy_wstunnel.

您还可以使用 apachectl -M 的输出来检查 Apache 正在加载的模块.

You can also use the output of apachectl -M to check the modules Apache is loading.

这篇关于无法将模块/mod_proxy_wstunnel.so 加载到服务器中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆