인터넷 접속 없이 'welcome to nginx' 화면이 나타나는 경우

안녕하세요,
nginx와 discourse에서 동일한 문제를 겪고 있습니다. discourse 대신 항상 “welcome to nginx” 페이지가 표시됩니다.
DNS와 메일 서버는 설정되어 있으며, 클라우드가 아닌 온프레미스 환경에서 호스팅하고 있습니다.
다음 가이드를 사용했습니다: discourse/docs/INSTALL-cloud.md at main · discourse/discourse · GitHub

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

도움 부탁드립니다 :smile:

18.04LTS를 사용하시길 권장합니다. 곧 지원이 종료될 릴리스는 피하는 것이 좋습니다.

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

Debian 9과 10도 시도해 보았습니다.
Ubuntu 18.04LTS도 시도하여 결과를 기록하겠습니다.

지속적으로 삭제하고 다시 구축하면 Let’s Encrypt가 임시로 인증서 발급을 중단합니다.

서버는 인터넷에 접근할 수 있지만, 인터넷에서 서버에 접근할 수는 없으며 DNS가 .lan로 끝납니다.
그러면… 권한 기관이 인터넷에서 이를 확인할 수 없으므로 letsencrypt가 아예 역할을 하지 않는 건가요?

Ubuntu 18.04LTS를 설치했는데 같은 문제가 발생합니다.

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

설치 가이드에서

:bell: IP 주소로는 Discourse를 사용할 수 없으며, example.com과 같은 도메인 이름을 소유해야 진행할 수 있습니다.

공개적으로 유효한 FQDN(완전 한정 도메인 이름)을 사용하지 않는 경우, 일반적인 설치 경로가 작동하지 않습니다. 로컬 DNS 항목과 도메인 이름은 여기서 상호 교환될 수 없습니다. DNS 항목이 유효하지 않기 때문에 Let’s Encrypt 인증서 발급이 실패합니다.

app.yml 파일을 수동으로 수정하여 HTTPS와 Let’s Encrypt를 제거해야 합니다. 불필요한 템플릿과 포트 443을 노출하는 항목을 주석 처리하세요.

자체 서명(self-signed) 인증서를 발급할 계획이 없는 한, 모든 콘텐츠를 HTTP로 서빙하게 됩니다.

Stephen님, 안녕하세요!

저도 Fun Tec에서 같은 문제를 겪고 있습니다. 제 도메인을 직접 사용하고 있으며, letsencrypt 문제라고 생각하지 않습니다. sudo ./launcher restart app 명령 실행 후 로그를 첨부합니다. 유용한 정보를 찾아주실 수 있을까요?

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

FunTec님, 안녕하세요!

netcat을 설치하지 않으신 것 같습니다. 도움이 되셨으면 좋겠습니다!

안녕하세요.

저도 정확히 같은 문제를 겪고 있습니다.

ubuntu: 20.04.3 LTS를 새로 설치하여 시작했습니다.

정리하자면, 아닙니다. Nginx는 이전에 설치되어 있지 않았습니다.

설치 로그 링크입니다: install

해결 방법을 알려주시면 감사하겠습니다.

저도 같은 문제를 겪고 있습니다.
Ubuntu 24 LTS를 새로 설치했습니다.
Bootstrap이 완료된 후 nginx 기본 페이지가 표시됩니다.
./discourse-doctor를 실행하면 다음과 같은 결과가 나옵니다:

DISCOURSE DOCTOR Fri Apr 25 06:19:55 PM UTC 2025
OS: Linux talk 6.8.0-58-generic #60-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 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! ====================

그리고 테스트 이메일은 예상대로 도착했습니다.
거의 해결된 것 같은 느낌이 듭니다.

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

서버에는 nginx나 apache2도 설치되어 있지 않습니다.

정리하자면, nginx 페이지는 호스트 컴퓨터에서 호스트 이름으로 접속할 때만 표시되는 것 같습니다. 네트워크상의 다른 컴퓨터에서는 연결 실패 오류만 발생합니다.

./discourse-setup을 실행하셨나요? 연결 테스트가 통과했나요?

네, ./discourse-setup은 부트스트래핑 순서 맞죠? 제가 실행하지 않았다면 컨테이너가 실행되지 않았을 거라고 생각해요. 여기에 있는 안내에 따라 진행했고, 약 7분 후에 Welcome to NGINX 페이지가 나타났어요.

제가 실행해 보면 될 특정 연결 테스트가 있나요? 설정 과정에서 출력된 내용이 너무 많아서 전부 캡처하지 못했어요.