Discourse not showing up at specified hostname


(Scott) #1

Hello,

I just ran through the installation steps and all appears to be fine in the server terminal. However when I go to the URL I added for the DISCOURSE_HOSTNAME I am getting the default splash page when I set up a new website.

I’m running a dedicated server using the ServerPilot control panel to install and manage my websites. From what I understand of ServerPilot, they configured my server with Nginx as a reverse proxy in front of Apache.

I have multiple sites running on this server at the moment, and setup a sub-domain to install a test instance of Discourse. The sub-domain is at dev.100foldpro.com.

I would guess that I need to setup a multisite installation but so far the information I have found is confusing with a lack of details.

Can someone point me to a recent guide on setting up Discourse.

I’m assuming there’s something that will need to be configured regarding Nginx, but the way ServerPilot sets it up doesn’t seem to match with anything I have been able to find. I will admit this would be easier if I “really” understood how Nginx works vs Apache and what it means to have Nginx running as a reverse proxy in front of Apache.

Thank you in advance


(Jens Maier) #2

Is another webserver already running on your server? Keep in mind that only one process at a time can listen on the HTTP port. If you’re already running e.g. Apache with name-based virtual hosts, you’ll have to configure your existing Apache to act as a reverse proxy for Discourse and change Discourse’s config to expose itself on some unused port, ideally bound to localhost.

There are a few topics on meta covering this, e.g. Run Discourse with or alongside existing Apache sites? and the howto Running other websites on the same machine as Discourse (which focuses on using nginx as the global frontend server).

Also, mind that Apache in its typical default configuration isn’t well suited to host Discourse. You absolutely should run with mpm_event and a large AsyncRequestWorkerFactor setting or Apache won’t handle Discourse’s many long-running polling connections very well.


(Scott) #3

Hmmm, as I understand it both Apache and Nginx are running. I just found this at the ServerPilot website.

ServerPilot configures a LAMP/LEMP stack on your server. LAMP stands for Linux + Apache + MySQL + PHP. As ServerPilot also configures Nginx on your server, this is sometimes called a LEMP stack because Nginx is pronounced "Engine X."ServerPilot configures Nginx as the public-facing web server because it is much more scalable than Apache. Unlike Apache, Nginx can handle handle tens of thousands of simultaneous client connections. As Nginx waits until it has completely received the request before proxying the request through to Apache, your server is safe from Slowloris attacks. For your SSL-enabled apps, Nginx also provides extremely efficient SSL handling as well as SPDY support.

I’ll take a look at the information you posted, much appreciated, I have a lot to learn still !!


(Jens Maier) #4

Given the info you posted, you easiest route would be to uninstall both the default nginx and Apache and simply let Discourse take over.

Alternatively, since there’s already an nginx running, simply follow the howto I linked; you won’t even have to worry about configuring Apache to work properly with Discourse since it’ll be out of the loop. :slight_smile:


(Scott) #5

Yeah … it’s looking like I have to decide if it will be worth re-configuring my entire server so that it is better suited to run Nginx. The problem I have to deal with is there are two Minecraft servers and five websites that will need to be set back up.

I may end up setting up discourse on a local machine first in order to get a feel for what will be involved in running the forum before I make the decision to wipe and rebuild my server.

Thank you for your assistance … Pops


(Kane York) #6

As a note, the minecraft servers will be fine, it’s the websites you need to worry about. Try replicating the desired final website setup on a temporary/staging server.


(Scott) #7

Thanks guys, after some digging around it looks like I may have found some additional information that has gotten me closer, but I’m not quiet there yet.

You can see the progress I have made in this post - Configuring nginx to work alongside Discourse