Then I try to access http://localhost:8080 on my chrome browser and it tells me the site cannot be reached. It gives me a ERR_CONNECTION_REFUSED error. I assume it is supposed to show the default home page for the blog.
I tried clearing my browsing data, but that didn’t help. I also tried resetting permissions for localhost:8080 on chrome, but that didn’t work as well.
Have you tried it on any other browser? Did it error out in the same way? Just trying to specify the problem to see if something’s up with the WriteFreely config or Chrome.
Yes I did. It errors out on Mozilla and safari as well. Mozilla says “Unable to connect Firefox can’t establish a connection to the server at localhost:8080.”
Safari says " Safari CanĘĽt Connect to the Server
Safari canʼt open the page “​localhost:8080” because Safari canʼt connect to the server “localhost”."
Hi @Dami, just to be sure, are you trying to access http://localhost:8080 from the same computer you’re running WriteFreely on?
If you’ve installed WriteFreely on a remote server and you haven’t taken extra steps like forwarding ports on your local machine, accessing localhost won’t work at all. Instead, you’ll need to type the server’s IP address into your browser, for example http://192.0.0.1:8080, where 192.0.0.1 is the server IP.
Thanks for the hints. I installed write freely using an ubuntu server from digital ocean. I tried using the IP address and it gives me a different error. ERR_CONNECTION_TIMED_OUT. For some reason, the server is taking too long to respond even though the server is up and running.
That sounds to me like a firewall issue – access to port 8080 is probably blocked from the public internet. So for now you can allow access to this port through your firewall while you’re testing. And then whenever you’re ready to keep the site online, you can or install a reverse proxy like Nginx to make your site accessible on port 80 (normal HTTP port), instead of port 8080.
The firewall for my Mac is already switched off. I don’t know why it still doesn’t work. I have used port 8080 for web servers in the past and this has never happened. I wonder what’s different.
So if I understand you correctly, you installed WF on a remote machine, your Digital Ocean server, and you’re trying to access it from your Mac at home, yes?
In that case, the firewall issue @matt is talking about is not about your Mac. You need to open port 8080 on the remote server. Did you install ufw? If not, here’s the full process:
I’m running out of ideas. Do you have a domain pointing to your server already? You could try setting it up behind a reverse proxy.
Not related to your question: Do you have a website running on another server that’s accessing MySQL databases on this server? If not, there’s no reason to open port 3306. Locally installed sites will be able to access the databases anyway. This poses a security risk.
I don’t have a domain yet. I’ll try that. However, do you think changing the bind and host parameter in the config.ini to my server’s IP address instead of localhost would make a difference? I think I’ll try that as well.
Ah, changing the address from localhost to my ip address fixed it ! I’m thinking it’s because localhost defaults to 127.0.0.1, and writefreely was serving on 127.0.0.1 and using http://my-ip-addr:8080 on the browser wasn’t enough since wf wasn’t serving the files on my servers IP address. Is this correct?
Just came here to add my solution. I spent days ruling everything out from port to etc/hosts. My issue oddly was the wrong node version. Hope this helps someone.