Bekomme 'Willkommen bei nginx' ohne Internetzugang

Hallo,
ich habe das gleiche Problem mit nginx und Discourse. Statt Discourse wird immer die „Willkommen bei nginx"-Seite angezeigt.

DNS und Mailserver sind eingerichtet, und ich hoste on-premises, nicht in der Cloud.
Ich habe diesen Leitfaden verwendet: discourse/docs/INSTALL-cloud.md at main · discourse/discourse · GitHub

Frische Installation auf 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

Bitte helft mir :smile:

Ich empfehle die Verwendung von 18.04LTS und nicht einer Version, die bald nicht mehr unterstützt wird.

Was sagt docker ps?

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

Ich habe auch Debian 9 und 10 ausprobiert.
Ich werde auch Ubuntu 18.04LTS testen und das Ergebnis notieren.

Wenn Sie Let’s Encrypt ständig löschen und neu aufbauen, wird Let’s Encrypt vorübergehend die Ausstellung von Zertifikaten einstellen.

Der Server hat Zugriff auf das Internet, ist aber von außen nicht erreichbar, und die DNS-Endung lautet .lan.
Also… spielt Let’s Encrypt überhaupt eine Rolle, wenn die Zertifizierungsstelle es nicht aus dem Internet überprüfen kann?

Ich habe Ubuntu 18.04 LTS installiert und habe das gleiche 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

Aus dem Installationshandbuch

:bell: Discourse funktioniert nicht über eine IP-Adresse. Du musst über einen Domainnamen wie example.com verfügen, um fortzufahren.

Wenn du keine öffentlich gültige FQDN verwendest, funktioniert der normale Installationsweg nicht für dich. Lokale DNS-Einträge und Domainnamen sind hier nicht austauschbar. Let’s Encrypt wird fehlschlagen, da der DNS-Eintrag nicht gültig ist.

Du musst die app.yml manuell bearbeiten, um HTTPS und Let’s Encrypt zu entfernen. Kommentiere die unnötigen Vorlagen und den Eintrag, der den Port 443 freigibt, aus.

Es sei denn, du beabsichtigst, ein selbstsigniertes Zertifikat auszustellen, wirst du alles über HTTP bereitstellen.

Hallo Stephen!

Ich habe das gleiche Problem mit Fun Tec. Ich habe meine eigene Domain und ich denke nicht, dass es ein Problem von Let’s Encrypt ist. Hier sind meine Logs nach dem Befehl sudo ./launcher restart app. Kannst du einige nützliche Informationen finden?

Shutting Down
run-parts: executing /etc/runit/3.d/01-nginx
ok: down: nginx: 0s, normally up, want up
run-parts: executing /etc/runit/3.d/02-unicorn
(2165) exiting
ok: down: unicorn: 1s, normally up
run-parts: executing /etc/runit/3.d/10-redis
ok: down: redis: 0s, normally up
run-parts: executing /etc/runit/3.d/99-postgres
ok: down: postgres: 0s, normally up
ok: down: nginx: 2s, normally up
ok: down: postgres: 0s, normally up
ok: down: redis: 1s, normally up
ok: down: unicorn: 2s, normally up
ok: down: cron: 0s, normally up
ok: down: rsyslog: 0s, normally up
run-parts: executing /etc/runit/1.d/00-ensure-links
run-parts: executing /etc/runit/1.d/00-fix-var-logs
run-parts: executing /etc/runit/1.d/01-cleanup-web-pids
run-parts: executing /etc/runit/1.d/anacron
run-parts: executing /etc/runit/1.d/cleanup-pids
Cleaning stale PID files
run-parts: executing /etc/runit/1.d/copy-env
run-parts: executing /etc/runit/1.d/letsencrypt
[Wed 16 Dec 2020 01:26:10 PM UTC] Using CA: https://acme-v02.api.letsencrypt.org/directory
[Wed 16 Dec 2020 01:26:10 PM UTC] Single domain='a.mapengfei.xyz'
[Wed 16 Dec 2020 01:26:10 PM UTC] Getting domain auth token for each domain

Hallo FunTec!

Ich glaube, du hast netcat nicht installiert. Ich hoffe, das hilft dir!

Hallo.\n\nIch habe genau das gleiche Problem.\n\nIch beginne mit einer frischen Installation von Ubuntu: 20.04.3 LTS\n\nZur Klarstellung, nein. Nginx war vorher nicht installiert.\n\nHier ist ein Link zum Installationsprotokoll: install kann ich das beheben, danke.

Ich habe hier dasselbe Problem.
Frische Installation von Ubuntu 24 LTS
Bootstrap schließt ab, dann die Standardseite von Nginx.
Wenn ich ./discourse-doctor ausführe, erhalte ich:

DISCOURSE DOCTOR Fr 25. Apr 18:19:55 UTC 2025
OS: Linux talk 6.8.0-58-generic #60-Ubuntu SMP PREEMPT_DYNAMIC Fr Mär 14 18:29:48 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux


Found containers/app.yml

==================== YML SETTINGS ====================
DISCOURSE_HOSTNAME=talk.technospider.com
SMTP_ADDRESS=smtppro.zoho.com
DEVELOPER_EMAILS=REDACTED
SMTP_PASSWORD=REDACTED
SMTP_PORT=587
SMTP_USER_NAME=david@technospider.com
LETSENCRYPT_ACCOUNT_EMAIL=REDACTED

==================== DOCKER INFO ====================
DOCKER VERSION: Docker version 26.1.3, build 26.1.3-0ubuntu1~24.04.1

DOCKER PROCESSES (docker ps -a)

CONTAINER ID   IMAGE                 COMMAND        CREATED          STATUS          PORTS                                           
                           NAMES
394018ecf271   local_discourse/app   "/sbin/boot"   21 minutes ago   Up 21 minutes   0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->
443/tcp, :::443->443/tcp   app


Discourse container app is running


==================== PLUGINS ====================
          - git clone https://github.com/discourse/docker_manager.git

No non-official plugins detected.

See https://github.com/discourse/discourse/blob/main/lib/plugin/metadata.rb for the official list.

========================================
Discourse version at talk.technospider.com: NOT FOUND
Discourse version at localhost: NOT FOUND


==================== MEMORY INFORMATION ====================
OS: Linux
RAM (MB): 4055

               total        used        free      shared  buff/cache   available
Mem:            3867        1695         174          56        2345        2172
Swap:           3866          98        3768

==================== DISK SPACE CHECK ====================
---------- OS Disk Space ----------
Filesystem                         Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-ubuntu--lv   19G   12G  6.0G  66% /

==================== DISK INFORMATION ====================
Disk /dev/loop0: 44.45 MiB, 46604288 bytes, 91024 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop1: 73.89 MiB, 77475840 bytes, 151320 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop2: 144.46 MiB, 151478272 bytes, 295856 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/sda: 40 GiB, 42949672960 bytes, 83886080 sectors
Disk model: VMware Virtual S
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 57115BC0-AFA9-4902-9910-BB09315092BA

Device       Start      End  Sectors  Size Type
/dev/sda1     2048  2203647  2201600    1G EFI System
/dev/sda2  2203648  6397951  4194304    2G Linux filesystem
/dev/sda3  6397952 83884031 77486080 36.9G Linux filesystem

Disk /dev/mapper/ubuntu--vg-ubuntu--lv: 18.47 GiB, 19834863616 bytes, 38739968 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

==================== END DISK INFORMATION ====================

==================== MAIL TEST ====================
For a robust test, get an address from http://www.mail-tester.com/
Sending mail to REDACTED . .
Testing sending to technospider@icloud.com using smtppro.zoho.com:587, username:david@technospider.com with plain auth.
SMTP server connection successful.
Sending to technospider@icloud.com. . .
Mail accepted by SMTP server.
Message-ID: 9e763c7d-b64d-4119-8f74-edd47154a799@talk.technospider.com

If you do not receive the message, check your SPAM folder
or test again using a service like http://www.mail-tester.com/.

If the message is not delivered it is not a problem with Discourse.
Check the SMTP server logs for the above Message ID to see why it
failed to deliver the message.

==================== DONE! ====================

Und die Test-E-Mail kommt wie erwartet an.
Ich habe das Gefühl, ich bin ganz nah dran.

docker ps:

394018ecf271   local_discourse/app   "/sbin/boot"   47 minutes ago   Up 47 minutes   0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp   app

Auf dem Server ist weder Nginx noch Apache2 installiert.

Nur zur Klärung: Es scheint, dass die Nginx-Seite nur verfügbar ist, wenn man vom Host-Computer aus über den Hostnamen darauf zugreift. Alle anderen Computer im Netzwerk erhalten die Fehlermeldung „Verbindung fehlgeschlagen“.

Haben Sie ./discourse-setup ausgeführt? Waren die Verbindungstests erfolgreich?

Ja, ist ./discourse-setup die Bootstrapping-Sequenz, richtig? Der Container würde nicht laufen, wenn ich das nicht getan hätte, glaube ich nicht. Ich habe die Anweisungen hier befolgt, und etwa 7 Minuten später erhielt ich die Willkommensseite von NGINX.

Gibt es einen bestimmten Verbindungstest, den ich ausführen soll? Es gab so viel Ausgabe vom Setup, dass ich sie nicht alle erfassen konnte.