The user wp3 attempted to install Discourse on their main site, which runs WordPress on Ubuntu 20.04 with Nginx. After temporarily uninstalling Discourse, they were unable to access their WordPress site, receiving a privacy error with HTTPS and “Hello World!” with HTTP.
angus re-categorized the post and suggested breaking down the problem into smaller pieces. wp3 ran sudo netstat -tulpn and found no processes on ports 80 and 443, then killed two processes using port 80. However, this did not resolve the issue.
angus noted that Nginx appears not to be running and suggested starting it with sudo systemctl start nginx.
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?
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:
What’s using what ports? Is your wordpress webserver serving on port 80? You can use netstat to figure that out.
sudo netstat -tulpn
Is your webserver (i.e. nginx) correctly pointing to your wordpress files (probably in /var/www/html) ?
Is your SSL certificate valid and properly configured?
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.