Installation Bug: installing to root domain opens NGinx Outside Container


I am installing a new instance of Discourse and attempting to install it to the root of the domain (I have read Configure your hosted domain name at the root ( and can fulfil the requirements). I made a mistake the first time and noticed that if you provide an apex domain to the discourse-setup script, NGinx ends up running outside of docker - it is easy to test and replicate

  1. I spun up a new VM Instance and confirmed nginx was not installed and port 80 was not open
  2. Ran the discourse-setup script and provided an apex domain to the script
  3. Script runs to completion
  4. Nginx is running outside docker (as confirmed by ps -ax) and holding port 80; browsing to the domain shows the welcome to nginx screen

I searched for this and didn’t find another report, though have seen several people finding nginx running outside docker and this might be the cause

I realise this is my fault - though perhaps the script should not allow an apex domain to be provided?

This is technically not possible. I’m pretty sure that your VM probably had nginx pre-installed. some cloud providers bundle a web server (apache2 or nginx) in their standard images.

1 Like

Hi! Cheers; yes I had assumed that as well and so I provisioned a brand new VM, tested to ensure Nginx was not installed before running discourse-setup; immediately after nginx was running as described.

I have a few installs and have followed the exact procedure each time, and they all work as expects; this was the first time I tried to install to the root of the domain (so providing to the setup script) and had this issue. Same VM, same OS etc.

I’ll test again and grab some more logs

I have installed discourse on a root domain this morning to check it out, and that has loaded up fine. :+1: (Digital Ocean, 2GB droplet)

1 Like

ps -ax shows processes running inside Docker as well.
It’s containerization, not virtualization.

Try service nginx status inside and outside of the container.

root@ip:~# service nginx status
Unit nginx.service could not be found.
root@ip:~# cd /var/discourse/
root@ip:/var/discourse# ./launcher enter app
x86_64 arch detected.
service service root@ip-app:/var/www/discourse# service nginx status
[ ok ] nginx is running.
1 Like

cheers, will do - due to JavaScript heap out of memory due to Ember CLI i am on hold right now