Question

I know I have similar question with this post: Django tutorial on remote server: how to view in my browser? But I just can't solve it with the answer it has.

I am playing with Django framework now. I am trying to do the Django tutorial on my Linode server. Everything works fine, but when we have to examine the webpage we have, the tutorial says that we have to check http://127.0.0.1:8000/ on the server. I only have command line access on the Linode server, so I don't know how to see that webpage on the linode from my desktop. I tried to use the command like python manage.py runserver 123.123.123.123:8000 and set the ip to my Linode server, but I still can't access that webpage from my desktop (I do remove the firewall for 8000 port). Does anyone know how can I check the change for the remote webpage I created within Django framework on the Linode server? Thanks.

Was it helpful?

Solution

Just to make sure, are you trying to access the following URL in your browser (where the server ip address is 123.123.123.123)?

http://123.123.123.123:8000

Secondly, are you able to telnet to port 8000, to make sure you have correctly opened the port on the firewall.

OTHER TIPS

I had this problem too and I wanted to clarify what I did for others who might get stuck:

First, remove the firewall for port 8000

sudo nano /etc/iptables.firewall.rules
-A INPUT -p tcp --dport 8000 -j ACCEPT

Second, reboot the linode

Third, restart the development server

cd /home/mycode/mysite
python manage.py runserver 123.123.123.123:8000

(where you use your ip)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top