# Installation Bug: installing to root domain opens NGinx Outside Container

**URL:** https://meta.discourse.org/t/installation-bug-installing-to-root-domain-opens-nginx-outside-container/217257
**Category:** Self-hosting
**Created:** [February 6, 2022, 3:49pm UTC](https://meta.discourse.org/t/installation-bug-installing-to-root-domain-opens-nginx-outside-container/217257 "2022-02-06T15:49:24Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![ClubmanPlus850](https://avatars.discourse-cdn.com/v4/letter/c/b19c9b/32.png) [@ClubmanPlus850](https://meta.discourse.org/u/ClubmanPlus850)
#### Post date: [February 6, 2022, 3:49pm UTC](https://meta.discourse.org/t/installation-bug-installing-to-root-domain-opens-nginx-outside-container/217257/1 "2022-02-06T15:49:24Z")

</div>

Hi

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 Discourse site to run at the root or apex domain (e.g. example.com)](https://meta.discourse.org/t/configure-your-hosted-domain-name-at-the-root-example-com/60951) 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?

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [February 6, 2022, 4:44pm UTC](https://meta.discourse.org/t/installation-bug-installing-to-root-domain-opens-nginx-outside-container/217257/2 "2022-02-06T16:44:25Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![ClubmanPlus850](https://avatars.discourse-cdn.com/v4/letter/c/b19c9b/32.png) [@ClubmanPlus850](https://meta.discourse.org/u/ClubmanPlus850)
#### Post date: [February 6, 2022, 4:50pm UTC](https://meta.discourse.org/t/installation-bug-installing-to-root-domain-opens-nginx-outside-container/217257/3 "2022-02-06T16:50:15Z")

</div>

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 [example.com](http://example.com) to the setup script) and had this issue. Same VM, same OS etc.

I’ll test again and grab some more logs

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [February 7, 2022, 11:22am UTC](https://meta.discourse.org/t/installation-bug-installing-to-root-domain-opens-nginx-outside-container/217257/4 "2022-02-07T11:22:26Z")

</div>

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

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [February 7, 2022, 11:43am UTC](https://meta.discourse.org/t/installation-bug-installing-to-root-domain-opens-nginx-outside-container/217257/5 "2022-02-07T11:43:40Z")

</div>

> [@ClubmanPlus850](#):
>
> outside docker (as confirmed by ps -ax)

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

Try `service nginx status` inside and outside of the container.

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

```

---

<div class="post-metadata">

### Author: ![ClubmanPlus850](https://avatars.discourse-cdn.com/v4/letter/c/b19c9b/32.png) [@ClubmanPlus850](https://meta.discourse.org/u/ClubmanPlus850)
#### Post date: [February 7, 2022, 8:49pm UTC](https://meta.discourse.org/t/installation-bug-installing-to-root-domain-opens-nginx-outside-container/217257/6 "2022-02-07T20:49:20Z")

</div>

cheers, will do - due to [JavaScript heap out of memory due to Ember CLI](https://meta.discourse.org/t/javascript-heap-out-of-memory-due-to-ember-cli/217258) i am on hold right now
