JoyalV
April 21, 2017, 11:16pm
1
Hello,
I have a Ubuntu 16.04 VPS with Apache running two websites. I want to setup discourse but it seems like it will be a docker container (concept I am new to),.
How do I go about giving discourse a subdomain like forum.example.com then ensuring I can install SSL certs with Lets’ Encrypt?
Following instructions here: https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md
JoyalV
April 21, 2017, 11:26pm
3
I am using Apache, so I would create another VHost in /var/www ?
Or would I create a vhost and set it’s default folder as /var/discourse ?
mpalmer
(Matt Palmer)
April 21, 2017, 11:52pm
4
You’ll need to translate the instructions in the topic @Falco linked to from nginx to Apache.
2 Likes
JoyalV
April 22, 2017, 12:22am
5
Hmmm, I don’t know anything about nginx but I can try I guess
pfaffman
(Jay Pfaffman)
April 22, 2017, 3:42am
6
Gets pretty much it, but you configure the host add a reverse proxy.
JoyalV
April 22, 2017, 4:42am
7
so I would setup a VHost /var/www/discourse.domain.com and install in discourse in there rather than /var/discourse
And then add a reverse proxy?
mpalmer
(Matt Palmer)
April 22, 2017, 5:33am
8
No, you don’t setup a vhost anywhere on the host system. You proxy everything for the Discourse subdomain into the container.
fefrei
(Felix Freiberger)
April 22, 2017, 9:08am
9
There’s a (in my opinion) slightly easier alternative:
Configure your Apache to listen on a different port.
Set up nginx as a reverse proxy as described above.
Set up nginx to proxy the non-Discourse traffic to Apache’s port.
Note that if you want HTTPS (and you do want that), in that case, you’ll have to set this up in nginx.
1 Like
JoyalV
April 22, 2017, 7:01pm
10
I have no idea how to do that. All I have done is setup two sites with apache vhost and now want to add discourse
fefrei
(Felix Freiberger)
April 22, 2017, 7:13pm
11
Instructions for steps and have already been posted by @Falco above:
@pfaffman edited this heavily 2022.02.24. Blame me if it’s broken.
If you want to run other websites on the same machine as Discourse, you need to set up an extra NGINX or HAProxy proxy in front of the Docker container.
NOTE: This is for advanced admins
This guide assumes you already have Discourse working - if you don’t, it may be hard to tell whether or not the configuration is working.
You cannot use ./discourse-setup to set up Discourse if another server is using port 80 or 443. You will …
2 Likes
JoyalV
April 22, 2017, 7:30pm
12
Idk how to “Configure your Apache to listen on a different port.”
And the instruction says "This guide assumes you already have Discourse working " which I don’t. I am trying to install it onto a VPS with 2 normal sites already configured
pfaffman
(Jay Pfaffman)
April 23, 2017, 2:20pm
14
You’ll need 2gb to run Apache and Discourse, so if your current host doesn’t have 2 GB then there’s no advantage to using the same host.
If you don’t know how to change Apache port, you can Google that, but it likely means that the other instructions will be difficult to make sense of.
2 Likes