# Installing Discourse With Plesk Onyx (Ubuntu 14.04)

**URL:** https://meta.discourse.org/t/installing-discourse-with-plesk-onyx-ubuntu-14-04/65602
**Category:** Self-hosting
**Tags:** unsupported-install
**Created:** [2017 年7 月 4 日 16:56 UTC](https://meta.discourse.org/t/installing-discourse-with-plesk-onyx-ubuntu-14-04/65602 "2017-07-04T16:56:53Z")
**Posts on this page:** 20
**Page:** 2

<div class="post-metadata">

### Author: ![D.VE](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/d.ve/32/81526_2.png) [@D.VE](https://meta.discourse.org/u/D.VE)
#### Post date: [2017 年11 月 19 日 20:10 UTC](https://meta.discourse.org/t/installing-discourse-with-plesk-onyx-ubuntu-14-04/65602/22 "2017-11-19T20:10:04Z")

</div>

okay… tried that as well… didn’t work

---

<div class="post-metadata">

### Author: ![D.VE](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/d.ve/32/81526_2.png) [@D.VE](https://meta.discourse.org/u/D.VE)
#### Post date: [2017 年11 月 27 日 00:19 UTC](https://meta.discourse.org/t/installing-discourse-with-plesk-onyx-ubuntu-14-04/65602/23 "2017-11-27T00:19:05Z")

</div>

Is there someone who could help me here?

---

<div class="post-metadata">

### Author: ![worldofmadness](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/worldofmadness/32/120409_2.png) [@worldofmadness](https://meta.discourse.org/u/worldofmadness)
#### Post date: [2017 年12 月 31 日 14:14 UTC](https://meta.discourse.org/t/installing-discourse-with-plesk-onyx-ubuntu-14-04/65602/24 "2017-12-31T14:14:57Z")

</div>

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

```plaintext
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

```

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2017 年12 月 31 日 15:31 UTC](https://meta.discourse.org/t/installing-discourse-with-plesk-onyx-ubuntu-14-04/65602/25 "2017-12-31T15:31:50Z")

</div>

> [@worldofmadness](#):
>
> Job exception: hostname “[mail.community.worldofmadnesstv.uk](http://mail.community.worldofmadnesstv.uk)” does not match the server certificate

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

---

<div class="post-metadata">

### Author: ![odyright](https://avatars.discourse-cdn.com/v4/letter/o/e0b2c6/32.png) [@odyright](https://meta.discourse.org/u/odyright)
#### Post date: [2018 年4 月 29 日 16:20 UTC](https://meta.discourse.org/t/installing-discourse-with-plesk-onyx-ubuntu-14-04/65602/27 "2018-04-29T16:20:14Z")

</div>

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)`.

---

<div class="post-metadata">

### Author: ![markusk](https://avatars.discourse-cdn.com/v4/letter/m/f475e1/32.png) [@markusk](https://meta.discourse.org/u/markusk)
#### Post date: [2018 年6 月 10 日 20:03 UTC](https://meta.discourse.org/t/installing-discourse-with-plesk-onyx-ubuntu-14-04/65602/28 "2018-06-10T20:03:02Z")

</div>

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? - #3 by Falco](https://meta.discourse.org/t/how-to-specify-a-different-port-not-80-during-installation/47859/3)

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 |&nbsp;Plesk Onyx documentation](https://docs.plesk.com/en-US/onyx/administrator-guide/web-servers/apache-and-nginx-web-servers-linux/adjusting-nginx-settings-for-virtual-hosts.71997/)

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.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2018 年6 月 12 日 04:02 UTC](https://meta.discourse.org/t/installing-discourse-with-plesk-onyx-ubuntu-14-04/65602/29 "2018-06-12T04:02:26Z")

</div>

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

---

<div class="post-metadata">

### Author: ![markusk](https://avatars.discourse-cdn.com/v4/letter/m/f475e1/32.png) [@markusk](https://meta.discourse.org/u/markusk)
#### Post date: [2018 年6 月 13 日 08:42 UTC](https://meta.discourse.org/t/installing-discourse-with-plesk-onyx-ubuntu-14-04/65602/30 "2018-06-13T08:42:32Z")

</div>

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 😉

but well.. ¯\_(ツ)\_/¯

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2018 年6 月 13 日 13:12 UTC](https://meta.discourse.org/t/installing-discourse-with-plesk-onyx-ubuntu-14-04/65602/31 "2018-06-13T13:12:18Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [2018 年7 月 5 日 10:23 UTC](https://meta.discourse.org/t/installing-discourse-with-plesk-onyx-ubuntu-14-04/65602/32 "2018-07-05T10:23:37Z")

</div>

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](https://global.discourse-cdn.com/meta/original/3X/8/3/832af572a30a707df393172f11bd5774dac67a6f.png)

- Add additionnal nginx directives:

```plaintext
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](https://global.discourse-cdn.com/meta/original/3X/9/5/953493d7b6b7a2f972a52e9044a9629eb0043223.png)

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. 🙂

---

<div class="post-metadata">

### Author: ![savas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/savas/32/131277_2.png) [@savas](https://meta.discourse.org/u/savas)
#### Post date: [2018 年8 月 15 日 10:06 UTC](https://meta.discourse.org/t/installing-discourse-with-plesk-onyx-ubuntu-14-04/65602/33 "2018-08-15T10:06:00Z")

</div>

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

---

<div class="post-metadata">

### Author: ![savas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/savas/32/131277_2.png) [@savas](https://meta.discourse.org/u/savas)
#### Post date: [2018 年8 月 21 日 07:58 UTC](https://meta.discourse.org/t/installing-discourse-with-plesk-onyx-ubuntu-14-04/65602/34 "2018-08-21T07:58:32Z")

</div>

![image](https://global.discourse-cdn.com/meta/original/3X/e/f/ef652f0fa1599681e15848fedd4eadbd1eb79ba8.png)  
and after install i geting some errors and from docker module on plesk discoure shuting down

---

<div class="post-metadata">

### Author: ![savas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/savas/32/131277_2.png) [@savas](https://meta.discourse.org/u/savas)
#### Post date: [2018 年8 月 22 日 07:11 UTC](https://meta.discourse.org/t/installing-discourse-with-plesk-onyx-ubuntu-14-04/65602/35 "2018-08-22T07:11:21Z")

</div>

> [@dgateles](#):
>
> > Note: I forgot a detail. **Before perform ./discourse-setup, you need edit discourse-setup**.  
> > Open discourse-setup with text editor, search for **check\_ports() {** and change this:
> 
> > ```plaintext
> > check_port "80"
> > 
> > ```
> 
> check\_port “443”
> 
> > ```plaintext
> > 
> > ```
> 
> > To something like this:
> 
> > ```plaintext
> > check_port "8060"
> > 
> > ```
> 
> check\_port “9443”
> 
> > ```plaintext
> > 
> > ```
> 
> > Done.
> 
> After the fist installation, you get an error because 80 and 443 ports are in use by Plesk  
> Don’t worry!
> 
> Go to /containers/ and open app.yml with text editor (nano or wathever)  
> Find this lines:
> 
> - “80:80” # fwd host port 80 to container port 80 (http)
> - “443:443” # fwd host port 443 to container port 443 (https)
> 
> Change to something like this:
> 
> - “8060:80” # fwd host port 80 to container port 8060 (http)
> - “9443:443” # fwd host port 443 to container port 9443 (https)

**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](https://global.discourse-cdn.com/meta/original/3X/c/e/cecb57ca8831046928b6ebe950c2ed5f2a113034.png)  
 ![image](https://global.discourse-cdn.com/meta/original/3X/f/4/f497c930ff807d1f54b6ba69217b0062bbe5f068.png)

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

---

<div class="post-metadata">

### Author: ![savas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/savas/32/131277_2.png) [@savas](https://meta.discourse.org/u/savas)
#### Post date: [2018 年9 月 22 日 10:52 UTC](https://meta.discourse.org/t/installing-discourse-with-plesk-onyx-ubuntu-14-04/65602/36 "2018-09-22T10:52:27Z")

</div>

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

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2018 年9 月 22 日 15:02 UTC](https://meta.discourse.org/t/installing-discourse-with-plesk-onyx-ubuntu-14-04/65602/37 "2018-09-22T15:02:35Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![savas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/savas/32/131277_2.png) [@savas](https://meta.discourse.org/u/savas)
#### Post date: [2018 年10 月 11 日 02:43 UTC](https://meta.discourse.org/t/installing-discourse-with-plesk-onyx-ubuntu-14-04/65602/38 "2018-10-11T02:43:58Z")

</div>

no didint find the solution ssl not working on plesk install

---

<div class="post-metadata">

### Author: ![SvenC56](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/svenc56/32/132235_2.png) [@SvenC56](https://meta.discourse.org/u/SvenC56)
#### Post date: [2019 年2 月 24 日 12:20 UTC](https://meta.discourse.org/t/installing-discourse-with-plesk-onyx-ubuntu-14-04/65602/39 "2019-02-24T12:20:55Z")

</div>

> [@Canapin](#):
>
> Also, it seems that the docker proxy rules had to be in this very order otherwise it wouldn’t work:  
> ![image](https://global.discourse-cdn.com/meta/original/3X/9/5/953493d7b6b7a2f972a52e9044a9629eb0043223.png)

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.

---

<div class="post-metadata">

### Author: ![fhe](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fhe/32/113345_2.png) [@fhe](https://meta.discourse.org/u/fhe)
#### Post date: [2019 年2 月 24 日 14:59 UTC](https://meta.discourse.org/t/installing-discourse-with-plesk-onyx-ubuntu-14-04/65602/40 "2019-02-24T14:59:48Z")

</div>

> [@SvenC56](#):
>
> How did you add two proxy rules for the same route? Plesk does not allow this for me?

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

> [@SvenC56](#):
>
> I published the application on port 80. The Page is served via https but I get mixed content warning.

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

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2019 年2 月 24 日 15:10 UTC](https://meta.discourse.org/t/installing-discourse-with-plesk-onyx-ubuntu-14-04/65602/41 "2019-02-24T15:10:49Z")

</div>

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

---

<div class="post-metadata">

### Author: ![SvenC56](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/svenc56/32/132235_2.png) [@SvenC56](https://meta.discourse.org/u/SvenC56)
#### Post date: [2019 年2 月 24 日 15:22 UTC](https://meta.discourse.org/t/installing-discourse-with-plesk-onyx-ubuntu-14-04/65602/42 "2019-02-24T15:22:01Z")

</div>

> [@fhe](#):
>
> IIRC

These are my current settings:

 ![image](https://global.discourse-cdn.com/meta/original/3X/1/c/1cd1bcaa155300dab955eb590c3ce700f40a0602.png)

**Docker Proxy Rules**  
Port 80 =\> 8060

 ![image](https://global.discourse-cdn.com/meta/original/3X/8/1/816d17602efd8e40ae4e20a0f9f32ccc0f97c193.png)

**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;
}

```

[Previous page](https://meta.discourse.org/t/installing-discourse-with-plesk-onyx-ubuntu-14-04/65602.md?page=1)

[Next page](https://meta.discourse.org/t/installing-discourse-with-plesk-onyx-ubuntu-14-04/65602.md?page=3)
