I cannot access my main site after trying to install discourse

I tried to install discourage on my main site which already runs WordPress. So I run these:

sudo -s
git clone https://github.com/discourse/discourse_docker.git /var/discourse
cd /var/discourse

Now I see I have to follow this: Running other websites on the same machine as Discourse

I temporarily uninstalled discourse: ./launcher stop app & rm -r /var/discourse
I know this has to do with port 80 but nuginx configuration file remained unchanged.
When I visit my domain using https I get a privacy error. When I use HTTP, I get: Hello World!

Any idea how I can fix this to run my wordpress site again?

I use Ubuntu 20.04 + Nginx

1 Like

The #support:wordpress category is for support with the WP Discourse plugin, so I’ve re-categorised this.

You have managed to get into a bit of a pickle! At the risk of pointing out the obvious, the solution will depend on how your server is configured, what commands you’ve run and what files you’ve changed.

I understand that the precipitating cause of this was your attempt to install Discourse, but your request here is not really Discourse-related, it’s more about how you’ve configured your server. That said, if I were in your position I would break down the problem into pieces:

  1. What’s using what ports? Is your wordpress webserver serving on port 80? You can use netstat to figure that out.

    sudo netstat -tulpn
  2. Is your webserver (i.e. nginx) correctly pointing to your wordpress files (probably in /var/www/html) ?

  3. Is your SSL certificate valid and properly configured?

1 Like

Thank you very much for the detailed response! I highly appreciate your help and support.
After running sudo netstat -tulpn I see the below

Why I don’t see any processes on ports 80 and 443? Because I run:

sudo fuser 80/tcp

I saw two processes, I run:

sudo lsof -t -i tcp:80 -s tcp:listen | sudo xargs kill
echo kill $(sudo netstat -anp | awk '/ LISTEN / {if($4 ~ ":80$") { gsub("/.*","",$7); print $7; exit } }')

But even when these processes were running, the website was not accessible.
My webserver (i.e. Nginx) correctly points to my WordPress files. So the answer to the second question is yes.
The SSL is valid and properly configured. The answer to the third question is also yes.

1 Like

It looks like nginx is not running? Try

sudo systemctl start nginx

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.