After installing Spree Commerce and running these commands, I am unable to access my domain http://example.com:4000/
or http://example.com:4000/admin
.
When I run:
curl example.com:4000
I got: curl: (7) Failed to connect to example.com port 4000 after 27 ms: Connection refused
.
What is the reason I cannot access Spree Commerce on port 4:000 after fresh install and how can I correct this?
CodePudding user response:
There is no point for accessing - http://example.com:4000
. As per the spree documentation, you should use http://localhost:4000
for accessing the spree application.
For Backend
For APIs
Hope this helps.
CodePudding user response:
Firewall could be the principal problem. Have you tried checking opened ports?
List the current Iptables rules
sudo iptables -L
Add an Iptable rule (for example to open a Mysql port 3306)
sudo iptables -A INPUT -p tcp --dport 3306 -j ACCEPT
Remove an Iptable rule
sudo iptables -D INPUT -p tcp --dport xxxx -j ACCEPT