Wp-discourse SSL problem

AI-generated summary

deviant reported an SSL connection issue between WordPress and Discourse, both running on the same host with Discourse in Docker behind an Nginx reverse proxy. Despite correct API key and URL configuration, WordPress failed to connect, showing browser errors like “Secure Connection Failed” and “No data received,” with Nginx logs indicating SSL handshake failure. simon suggested testing TLS 1.2 compatibility via a WordPress plugin and checking for php-curl installation. deviant later resolved the issue by upgrading Nginx to 1.12 (though it required recreating all vhosts), after which wp-discourse successfully connected. The fix appears to have resolved the SSL handshake problem, though long-term functionality remains to be confirmed.

Elo Discoursers..

I have Discourse and Wordpress running on the same host, except that Discourse is inside a Docker container with Nginx setup “external” to docker using a reverse-proxy.

Installed wp-discourse on my Wordpress site, but it will not connect to Discourse.
I do have the API key from my Discourse instance and the correct URL entered into Wordpress, but when I hit Save …

  • IceCat browser says: Secure Connection Failed

  • Chromium says: No data received

  • Nginx log indicates:

SSL_shutdown() failed (SSL: error:140E0197:SSL routines:SSL_shutdown:shutdown while in init) while SSL handshaking

Discourse is installed using the Docker image. In my app.yml I have:

- "templates/web.socketed.template.yml"

.. so the Nginx conf has:

    location / {
        proxy_pass http://unix:/var/discourse/shared/standalone/nginx.http.sock:;
        proxy_set_header Host $http_host;
        proxy_http_version 1.1;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto https;
    }

I am sure this is an SSL issue. The Letsencrypt certs are installed and configured in the “exernal” host through Nginx:

    ssl_certificate      /etc/letsencrypt/live/forum.librenet.co.za/fullchain.pem;
    ssl_certificate_key  /etc/letsencrypt/live/forum.librenet.co.za/privkey.pem;

I have no idea how to troubleshoot or fix this. Where could the problem be? Is it the Location (“proxy_pass”) directive?

Any input will be appreciated.

Could you try installing this WordPress plugin to test your site’s TLS 1.2 compatibility?

Go to Tools/TLS 1.2 Compatibility test to run the test. You can run it with the PayPal API endpoint. I’ve run into problems when the php-curl extension isn’t installed on the server.

Thanks for the input, Simon.

I have not done that test yet, but what I did do was upgrade Nginx to 1.12 (in the process I managed to nuke all my vhosts - so they all had to be recreated … >.<)

But after that exercise - wp-discourse shows connected!

So … unless there is an issue later with actual content moving between the apps, I think I’m all good for now :slight_smile: