How to Install proxy_wstunnel_module

Asked 2 years ago, Updated 2 years ago, 158 views

Ubuntu 12.04
apache2:Server version:Apache/2.2.22
* install with sudo apt-get install apache2

for the configuration. I would like to install proxy_wstunnel_module

Not even in /etc/apache2/mods-available. proxy_wstunnel_module.so
I looked for in find, but there are none.

If you know how to install it, please let me know.

I installed apache2.4.I also enabled mod_proxy_wstunnel.
Configure apache settings

<VirtualHost*:80>
    ServerAdmin webmaster@localhost
    ServerName ubuntu.jp
    ServerAlias www.ubuntu.jp
    DocumentRoot/var/ubuntu
    Options FollowSymlinks MultiViews ExecCGI
    DirectoryIndex index.html index.php

    Alias/node/var/ubuntu/node

    <Location/node/>
      ProxyPass http://localhost:3000/
      ProxyPassws://localhost:3000/
      ProxyPassReverse http://localhost:3000/
      ProxyPassReverses://localhost:3000/
      Require all graded
    </Location>

    ErrorLog${APACHE_LOG_DIR}/ubuntu_error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerge
    LogLevel warn

    CustomLog${APACHE_LOG_DIR}/ubuntu_access.log combined
    ServerSignature Off

    <Directory"/var/ubuntu/">
        Require all graded
    </Directory>
</VirtualHost>

Yes, but Socket communication is not possible.
If you know how to deal with it, please let me know.

node.js apache ubuntu websocket

2022-09-30 19:22

3 Answers

mod_proxy_wstunnel is a module available from Apache httpd version 2.4.
Not included in version 2.2.

If ubuntu provides Apache httpd2.4, you can use
If not, do you want to compile a patch for version 2.2 by applying it to the Apache httpd 2.2.x source code or compile Apache httpd 2.4.x from the source code?


2022-09-30 19:22

(For additional questions)

I think mod_proxy_http is used because the http: line is ahead.
I think only ws:

is fine.
ProxyPassws://localhost:3000/
ProxyPassReverses://localhost:3000/


2022-09-30 19:22

Even if you write two ProxyPass, it will be processed by the first one.
Why don't you specify a transfer rule to ws in ProxyPassMatch and then transfer the rest to http in ProxyPass?

ProxyPassMatch^/node/Regular expression pattern $ws://localhost:3000/
ProxyPass/node/http://localhost:3000/

I couldn't read the regular expression pattern from your question.


2022-09-30 19:22

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.