Docker and Engintron issue

Hi all.
I’ve been working on this now for about two months without success so I’ve bitting the bullet and am asking for your help.

I’ve a Centos7 + WHM VPS which otherwise is working fine.
On it I have several Cpanel accounts, including a large 12 year old phpbb forum which I’m wanting to migrate to Discourse to bring it into the 21st century.

I’ve successfully installed Docker and loaded an empty discourse instance on the VPS (this was tested before migrating everything else to the VPS; I turned off apache to during this stage). Great! It worked!

But to host my other Cpanel accounts I need to use Nginx. I found that the Cpanel plug in Engintron looked to be the best way to deploy Nginx, as it automatically managed a lot of the processes for me.

With Engintron (Nginx) running, my other Cpanel accounts were successfully migrated across to the VPS and are otherwise running fine.

Now I’ve been trying to spin up Discourse to start the migration. Nginx seems to handle this fine for the Apache sites, however I’m getting an issue with Discourse that I just can’t resolve.

The Discourse site is served (I can see this by viewing the page source and header) but the page is blank.
Upon viewing the Console report I see nothing but a see of red 502 errors. It seems that anything deeper than the root directory is not being served, including CSS, images, etc.

Here you can see the blank page of discourse, with the Source showing lots of errors.

I can only assume that Engintron/Nginx is causing this problem.

I have the following config:

# Definition block for domain(s): mystie.com #
 server {
 listen 443 ssl http2;
 #listen [::]:443 ssl http2;
 server_name mysite.com
     mail.mysite.com
     www.mysite.com
     cpanel.mysite.com
     webdisk.mysite.com
     webmail.mysite.com;
 # deny all; # DO NOT REMOVE OR CHANGE THIS LINE - Used when Engintron is disabled to block Nginx from becoming an op
 en proxy
 ssl_certificate /var/cpanel/ssl/apache_tls/mysite.com/combined;
 ssl_certificate_key /var/cpanel/ssl/apache_tls/mysite.com/combined;
  
 include common_https.conf;
  
 location = / {
     proxy_pass              http://unix:/var/discourse/shared/standalone/nginx.http.sock;
     proxy_set_header        X-Real-IP $remote_addr;
     proxy_set_header        Host $host;
     proxy_http_version      1.1;
     proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
     proxy_set_header        X-Forwarded-Proto "https";
     }

}

Can anyone point my in the right direction here?

Here are the HTTP errors

See Running other websites on the same machine as Discourse

1 Like