想用中文说清楚:我在远程工作机服务器上建立了django框架,想启动web server ,启动成功,但是无法打开127.0.0.1:8000 ,中间端口转接该怎么做

149 views
Skip to first unread message

dur...@corp.netease.com

unread,
Jun 11, 2015, 8:33:06 AM6/11/15
to django...@googlegroups.com
我在远程工作机服务器上建立了django框架,想启动web server ,启动成功,但是无法打开127.0.0.1:8000 ,中间端口转接该怎么做?
我用pc在办公室登录远程服务器A1,通过中转机A1登录到服务器A2,在A2上搭建了django框架,启动web服务器,想要打开http://127.0.0.1:8000的web界面,总是没办法打开。这种情况该怎么处理

Neto

unread,
Jun 11, 2015, 10:26:48 AM6/11/15
to django...@googlegroups.com
通过远程计算机,您无法打开地址?如果是这样,你应该用你的电脑的IP要访问。

Sergiy Khohlov

unread,
Jun 11, 2015, 10:46:40 AM6/11/15
to django-users
 127.0.0.1  is always your local PC.
 you should use another one interface for accessing from remote host.
 if  your local PC has IP 192.168.0.10
  right syntax is django-admin.py runserver 192.168.0.10:8000

Many thanks,

Serge


+380 636150445
skype: skhohlov

On Thu, Jun 11, 2015 at 5:26 PM, Neto <paulosou...@gmail.com> wrote:
通过远程计算机,您无法打开地址?如果是这样,你应该用你的电脑的IP要访问。

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/029d94b6-7967-4921-ba3e-16c8d3fe3a01%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

David Wong

unread,
Jun 12, 2015, 9:51:31 AM6/12/15
to django...@googlegroups.com
127.0.0.1只能本机访问,其他网络终端要访问就得使用更大范围的网络段。如果两台机器同在一个局域网,那可以用局域网IP,如192.168.1.11这样的,如果不在局域网内那么就得用公网IP。前提是服务器上的django服务端口得绑定在你所访问的ip上

发自我的 iPhone

Alvie Zhang

unread,
Jun 26, 2015, 8:54:33 PM6/26/15
to django...@googlegroups.com
你得确认你的机器能否访问A2,如果不能的话,就不太好弄了。如果能,按照楼上的说法,startserver时指定参数 0.0.0.0:8000,然后在浏览器输入A2的IP:8000就能访问了。
猜测贵司是通过登录类似堡垒机之类的登录服务器吧,我所在公司只有登录线上服务器才会这么干...

在 2015年6月11日星期四 UTC+8下午8:33:06,dur...@corp.netease.com写道:
Reply all
Reply to author
Forward
0 new messages