Roots Discourse

Nginx SSL Reverse Proxy

Hey there,

I have a standard Wordpress Site running with SSL on a Digitalocean Droplet deployed with trellis.
A child nginx config is set up to add a listener on a specific port to proxy to my node.js App, but the server rejects the connection to my running node.js application.

My Child config:
{% extends ‘roles/wordpress-setup/templates/wordpress-site.conf.j2’ %}

{% block server_before -%}
server {
  listen [::]:21000 ssl;
  listen 21000 ssl;

  access_log   /srv/www/;
  error_log    /srv/www/;

  # SSL configuration
  include h5bp/directive-only/ssl.conf;
  include h5bp/directive-only/ssl-stapling.conf;
  ssl_dhparam /etc/nginx/ssl/dhparams.pem;
  ssl_buffer_size 1400; # 1400 bytes to fit in one MTU

  add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; ";
  ssl_certificate         /etc/nginx/ssl/letsencrypt/;
  ssl_certificate_key     /etc/nginx/ssl/letsencrypt/;

  include acme-challenge-location.conf;

  include includes.d/all/*.conf;
  include includes.d/*.conf;

  location / {
    rewrite ^/(.*) /$1 break;
    proxy_redirect     off;
    proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header   X-Forwarded-Proto https;

{% endblock %}

Does anyone have an solution?
On my local machine with vagrant it is working.