Installing Discourse With Plesk Onyx (Ubuntu 14.04)

okay… tried that as well… didn’t work

Is there someone who could help me here?

followed this and all setup with out any errors that i could find the only problem is the email keep getting on the 587 port if i use 465 i dont get the error but still dont get the email so im at a loss to this as its officially fried my brain for the last week

Processing by FinishInstallationController#resend_email as HTML
  Parameters: {"authenticity_token"=>"LRaNVnT95+W37R6x4t6kr9IgBwu3oOph73PRTO3jjBWT7oGgU/+f08eMMH2zMHIPvCupyBTWrMqGX4Nf6ccX3A=="}
  Rendering finish_installation/resend_email.html.erb within layouts/finish_installation
  Rendered finish_installation/resend_email.html.erb within layouts/finish_installation (0.6ms)
  Rendered common/_special_font_face.html.erb (0.1ms)
  Rendered layouts/_head.html.erb (0.2ms)
Completed 200 OK in 372ms (Views: 1.9ms | ActiveRecord: 11.8ms)
Sent mail to info@community.worldofmadnesstv.uk (31.5ms)
Job exception: hostname "mail.community.worldofmadnesstv.uk" does not match the server certificate

Looks like the problem is with the security certificate of your mail server.

1 Like

hey @D.VE plesk onyx doesn’t allow you to run your discourse’s app in their root folder var/discourse. Instead you have to change everything in your cloned disourse git… to look for your correct config. i.e: var/www/hostfile/(your.domaine.com).

so i ended up doing another install on a plesk-managed system following this guide, though i know it’s not the ideal solution as it uses non-standard ports which one’s discouraged to do in multiple places like: How to specify a different port (not 80) during installation?

but with all the tinkering and testing today with things way over my head i started to think that there might be an easier and more clean solution that just nobody had considered yet - as there seem to be all pieces in place with plesk onyx. as there already is an nginx running and quite configurable from what i can tell Adjusting nginx Settings for Virtual Hosts

from what i could find so far there doesn’t seem to be a way to disable the ‘classic’ webhosting for a subdomain and have a docker container ‘take over’ ports 80&443. but as i understand it it’s an nginx proxying anyways - so shouldn’t it be possible to make this map all the traffic to the docker container (i for one wouldn’t need anything else running in that subdomain.

would be nice if someone with a bit more knowledge of all this could have a look to find a proper solution for this.

tia,
markus.

I think that some people have described here how to do that, though it’s not really supported.

no, it’s not described here (or anywhere else as far as i could reach over the last week) how to use plesk’s own nginx to do a proper proxying so one doesn’t have to change ports the discourse installation is using (set in app.yml).

also it wasn’t possible so far to find out what “not really supported” might mean for the future of a production setup - but that’s a different story :wink:

but well… ¯_(ツ)_/¯

No. Changing ports that Discourse is using and reverse proxy is the easy and recommended way to use discourse on the same server as other web applications. If you check it out the how-to topics about running discourse with other applications they are exactly the same, without the plesk particulars.

If this is too complicated, pay $5/month and get another server.

1 Like

Hi,
I struggled to install Discourse on Plesk and I also had to do the following in the nginx/apache domain settings:

  • Disable proxy mode:

image

  • Add additionnal nginx directives:
location =/ {
	proxy_pass http://0.0.0.0:8060;
	proxy_set_header Host             $host;
	proxy_set_header X-Real-IP        $remote_addr;
	proxy_set_header X-Forwarded-For  $proxy_add_x_forwarded_for;
	proxy_set_header X-Forwarded-Proto https;
}

Also, it seems that the docker proxy rules had to be in this very order otherwise it wouldn’t work:
image

I have Plesk 17.8, Debian 8.11 and my server is installed on a VPS3 server from OVH.

May it help someone one day. :slight_smile:

1 Like

did everithing step by step and getting 502 bad ateway nginx plz help domain https://www.tavoweb.lt
plus i getting this error Error: {“message”:“Container is marked for removal and cannot be started.”}


and after install i geting some errors and from docker module on plesk discoure shuting down

Instalation in server with plesk inportant step
The ploblem with ssl on and error tomeny redirections
If instaling with ssl (lets encrypt)
## Uncomment these two lines if you wish to add Lets Encrypt (https)
- “templates/web.ssl.template.yml”
- “templates/web.letsencrypt.ssl.template.yml”

how to solve?
Open thous files and search port number “80” and replace with your new port as in documentation 8060.
save files and rebuild discourse … done
this step solves redirecting to meny times …
image

P.S. ./launcher rebuild app after modifications …

Hey after install i geting to meny redirect in browser eny solutions ?

That’s a pretty common problem that has little to do with discourse. Searching “too many redirects” with plex or apache should get you there.

1 Like

no didint find the solution ssl not working on plesk install

How did you add two proxy rules for the same route? Plesk does not allow this for me?

Did someone manage to run discourse with HTTPS on Plesk?

Edit:
I published the application on port 80. The Page is served via https but I get mixed content warning.

IIRC, this was possible in the past but is currently not.

Have you enabled “Permanent SEO-safe 301 redirect from HTTP to HTTPS” in Hosting Settings?

1 Like

Also make sure that the force https site setting is enabled.

1 Like

These are my current settings:
image

Docker Proxy Rules
Port 80 => 8060

image

In Discourse Settings:
force_https: false

When I try to add nginx settings I can’t even access the page anymore. (404 Errors)
Additional nginx directives

location ~ ^/.* {
	proxy_pass http://0.0.0.0:8060;
	proxy_set_header Host             $host;
	proxy_set_header X-Real-IP        $remote_addr;
	proxy_set_header X-Forwarded-For  $proxy_add_x_forwarded_for;
	proxy_set_header X-Forwarded-Proto https;
}