Getting 'welcome to nginx' with no access to internet

Hello,
I have the same problem with nginx and discourse. Always getting the “welcome to nginx"-Page instead of discourse.
DNS and Mail server are setup and I’m hosting on-prem and not in the cloud.
I used this guide: discourse/INSTALL-cloud.md at master · discourse/discourse · GitHub

Fresh installation from Ubuntu:

Distributor ID: Ubuntu
Description:    Ubuntu 19.10
Release:        19.10
Codename:       eoan

lsof -i:80
COMMAND     PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
docker-pr 23296 root    4u  IPv6  62651      0t0  TCP *:http (LISTEN)

netstat -plnt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      819/systemd-resolve
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      906/sshd
tcp6       0      0 :::80                   :::*                    LISTEN      23296/docker-proxy
tcp6       0      0 :::22                   :::*                    LISTEN      906/sshd
tcp6       0      0 :::443                  :::*                    LISTEN      23283/docker-proxy

please help me :smile:

I’d recommend using 18.04LTS and not a release that’s going to be unsupported soon.

What does docker ps say?

docker ps
CONTAINER ID        IMAGE                 COMMAND             CREATED             STATUS              PORTS                                      NAMES
01b8b484088b        local_discourse/app   "/sbin/boot"        12 hours ago        Up 12 hours         0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp   app

I also tried Debian 9 and 10.
I will also try Ubuntu 18.04LTS and write down the result

If you keep wiping and rebuilding let’s encrypt is going to temporarily stop issuing certificates.

The server has access to the Internet, but is not accessible from the Internet and the DNS ends with .lan
Soo… does letsencrypt play a role at all, because authority can’t check it from the Internet?

I installed Ubuntu 18.04LTS and I have the same problem.

lsb_release -a:
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.4 LTS
Release:        18.04
Codename:       bionic

lsof -i:80
COMMAND    PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
docker-pr 1598 root    4u  IPv6  21087      0t0  TCP *:http (LISTEN)

netstat -tulpn:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      854/systemd-resolve
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1233/sshd
tcp6       0      0 :::80                   :::*                    LISTEN      1598/docker-proxy
tcp6       0      0 :::22                   :::*                    LISTEN      1233/sshd
tcp6       0      0 :::443                  :::*                    LISTEN      1583/docker-proxy
udp        0      0 127.0.0.53:53           0.0.0.0:*                           854/systemd-resolve

docker ps:
CONTAINER ID        IMAGE                 COMMAND             CREATED             STATUS              PORTS                                      NAMES
798e15496293        local_discourse/app   "/sbin/boot"        2 hours ago         Up 3 minutes        0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp   app

From the Install Guide

:bell: Discourse will not work from an IP address, you must own a domain name such as example.com to proceed.

If you’re not using a publicly valid FQDN then the normal install route won’t work for you. Local DNS entries and domain names aren’t interchangeable here. Let’s Encrypt will fail because the DNS entry isn’t valid.

You’re going to need to modify the app.yml by hand to eliminate HTTPS and Let’s Encrypt. Comment out the unnecessary templates and the entry which exposes port 443.

Unless you plan on issuing a self-signed certificate you will be serving everything over HTTP.

3 Likes