简体   繁体   English

mod_proxy_wstunnel,sudo a2enmod proxy_wstunnel不适用于centos

[英]mod_proxy_wstunnel, sudo a2enmod proxy_wstunnel does not work on centos

Hi I am trying to install mod_proxy_wstunnel as instructed in the link http://www.amoss.me.uk/2013/06/apache-2-2-websocket-proxying-ubuntu-mod_proxy_wstunnel/ , I am running Centos server. 嗨,我正在尝试按照链接http://www.amoss.me.uk/2013/06/apache-2-2-websocket-proxying-ubuntu-mod_proxy_wstunnel/中的说明安装mod_proxy_wstunnel,我正在运行Centos服务器。 When I run the command 当我运行命令

sudo a2enmod proxy_wstunnel

I get a error 我收到一个错误

sudo: a2enmod: command not found. sudo:a2enmod:找不到命令。

Could anyone please help me. 有谁可以帮助我。

Cheers Sunil 干杯苏尼尔

This module is not listed in /etc/httpd/conf.modules.d/00-proxy.conf to be uncommented but that doesn't mean it's not there. /etc/httpd/conf.modules.d/00-proxy.conf未列出此模块要取消注释,但这并不意味着它不存在。 It's available in /etc/httpd/modules/mod_proxy_wstunnel.so 它位于/etc/httpd/modules/mod_proxy_wstunnel.so

Just edit file 只需编辑文件

vi /etc/httpd/conf.modules.d/00-proxy.conf

and add this to the end 并将其添加到最后

LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so

Restart apache and check 重启apache并检查

service httpd restart
httpd -M | grep wstunnel

If you get 如果你得到

 proxy_wstunnel_module (shared)

You are ready to roll 你准备好了

The a2enmod command is an Ubuntu on Apache construct, which is why you are getting the error. a2enmod命令是Apache构造上的Ubuntu,这就是你得到错误的原因。 All this command does is symlink the .so module files in mods-available to mods-enabled. 所有这个命令都是符号链接mods中的.so模块文件 - 可用于mods-enabled。 These are then loaded automatically by Apache. 然后由Apache自动加载它们。 However, those folders are another Ubuntu on Aapache construct so you won't find them on Centos. 但是,这些文件夹是Aapache构造中的另一个Ubuntu,因此您无法在Centos上找到它们。 Centos uses a modules directory in the /etc/httpd directory that is a symlink to /usr/lib64/httpd/modules (on my system) so you just need. Centos使用/ etc / httpd目录中的modules目录,它是/ usr / lib64 / httpd / modules(在我的系统上)的符号链接,所以你只需要。

That said, in order to install mod_proxy_wstunnel you need to have Apache2.4 or better. 也就是说,为了安装mod_proxy_wstunnel,您需要拥有Apache2.4或更高版本。 See the compatability on http://httpd.apache.org/docs/2.4/mod/mod_proxy_wstunnel.html . 请参阅http://httpd.apache.org/docs/2.4/mod/mod_proxy_wstunnel.html上的兼容性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM