• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Secure websockets (WSS)

Kevin Kleine

New Pleskian
Dear all,

Can anyone tell me how I should to set up a secure websocket server with Plesk?

At this point I have set up the Plesk firewall so that traffic from/to port 8080 is allowed and I have a websocket server (Ratchet - a PHP implementation) running perfectly (but only for non-secure (ws) websockets). I also have a SSL wildcard certificate in place (covers all the subdomains), which is set to be the Plesk default certificate.

I read about a proxy_wstunnel module for Apache, but I can't activate it under "Tools and settings -> Apache web server settings" because when I select it and apply, Plesk serves me the following error:

"Error: START httpd_modules_ctl --enable proxy_wstunnel websrvmng: /usr/local/psa/admin/sbin/apache_control_adapter execution failed: websrvmng: /usr/local/psa/admin/sbin/apache_control_adapter execution failed:"

After that, Apache won't start until I change the config file in "/etc/httpd/conf.modules.d/00-base.conf" and comment out the newly added line:

LoadModule proxy_wstunnel_module /usr/lib64/httpd/modules/mod_proxy_wstunnel.so

After that config line is 'gone', I can execute "apachectl" and everything is running again.

I have tried adding several additional directives for HTTP(S) under "Websites and domains -> {subdomain} -> Apache & Nginx settings", all along the lines of:

ProxyPass / wss://localhost:8080/
ProxyPassReverse / wss://localhost:8080

However, everytime I try to connect with a secure websocket client, the connection simply times out - it isn't working.

Can anyone help me with this? Thanks in advance!
 
Back
Top