Report this

What is the reason for this report?

Unable to access the URL after deploying Discourse

Posted on September 24, 2025

I want to confirm the operation process. First, connect to my server and complete the corresponding steps according to the discourse prompt. Then, if you cannot access the website, you need to download nginx or apache (download any one). I installed nginx according to this operation but an error occurred. What should I do next?

https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-20-04

root@discourse:~# sudo ufw allow ‘Nginx HTTP’

Rule added

Rule added (v6)

root@discourse:~# sudo ufw allow ‘Nginx HTTPS’

Rule added

Rule added (v6)

root@discourse:~# sudo ufw status

Status: active

To Action From


22/tcp LIMIT Anywhere

80/tcp ALLOW Anywhere

443 ALLOW Anywhere

Nginx HTTP ALLOW Anywhere

Nginx HTTPS ALLOW Anywhere

22/tcp (v6) LIMIT Anywhere (v6)

80/tcp (v6) ALLOW Anywhere (v6)

443 (v6) ALLOW Anywhere (v6)

Nginx HTTP (v6) ALLOW Anywhere (v6)

Nginx HTTPS (v6) ALLOW Anywhere (v6)

root@discourse:~# systemctl status nginx

× nginx.service - A high performance web server and a reverse proxy server

Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset:>

Active: failed (Result: exit-code) since Wed 2025-09-24 19:41:30 UTC; 2min>

Docs: man:nginx(8)

CPU: 13ms

lines 1-5/5 (END)



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hey,

Looking at your output, nginx is failing to start. This is a common issue when Discourse is already using ports 80 and 443, which nginx also needs. Here’s how to diagnose and fix this:

Step 1: Check what’s using the ports

sudo netstat -tlnp | grep ':80\|:443'

or

sudo ss -tlnp | grep ':80\|:443'

Step 2: Check nginx error logs

sudo journalctl -u nginx.service -l --no-pager

or

sudo tail -f /var/log/nginx/error.log

Step 3: Check if Discourse is running

sudo docker ps

Most likely solutions:

If Discourse is already running and using ports 80/443: You don’t actually need nginx! Discourse’s built-in reverse proxy handles this. Try accessing your site directly with your domain/IP.

If you still want to use nginx as a reverse proxy:

  1. Stop Discourse temporarily:
   cd /var/discourse
   sudo ./launcher stop app
  1. Start nginx:
   sudo systemctl start nginx
   sudo systemctl status nginx
  1. Configure nginx to proxy to Discourse (running on a different port), then restart Discourse.

Quick test - try accessing your site: Before making changes, try visiting your domain in a browser. If Discourse installed correctly, it might already be working without nginx.

What do you see when you run the diagnostic commands above? This will help determine the exact issue.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.