开发者

Django on SSH public IP

I have Django installed on my SSH-server. But the SSH-server I'm working on, is not at my home. So the local ip-adres Django 开发者_如何学编程creates (127.0.0.0:8000) isn't available for me, I can't test my Django-apps graphicly. What could be a Solution to get it work?

Djano has a command runserver that could set the IP-adres of the server like this:

django-admin.py runserver [IP]:[port]

But which IP I have to fill in there to make it work? The only IP I have is the IP of the SSH-server. Isn't it possible to fill in the IP-address of my webhost(but where I need to give in password etc)?

Thanks a lot!


Choose a publicly available port (say 8000), or redirect an existing web server to use the port you choose, and then start with

django-admin.py runserver 0.0.0.0:8000

Edit

If you happen not to control your available ports, you probably need to hook apache in front of your app. See https://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/ for info on how to deliver your app with apache and mod_wsgi.


You can try Putty with its tunnels. This program for windows, but I think you can find it for Linux if you use it. I used it to get access to my Postgres databse with pgAdmin with this article. So you can use tunnel for 8000 port and program to get access to it on your local machine.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜