【问题标题】:How to run django remotely?如何远程运行django?
【发布时间】:2019-01-31 08:43:54
【问题描述】:

我在远程 Ubuntu 服务器上运行 Yang Explorer

我在存储库中使用start.sh 运行它。

Activating virtualenv ..
Starting YangExplorer server ..
Use http://localhost:8088/static/YangExplorer.html    
Performing system checks...    
System check identified no issues (0 silenced).
January 31, 2019 - 08:35:31
Django version 1.8.3, using settings 'server.settings'
Starting development server at http://localhost:8088/

我想使用我的机器在浏览器中打开应用程序。给服务器的 IP 地址是152.66.xx.xx

【问题讨论】:

标签: python django remote-access remote-server


【解决方案1】:

使用 ip-address 运行(共享服务器) 启动服务器:

使用 if-config 确定

YangExplorer.html 中添加ip-address/port 在以下行之后:

cd <install-root>/yang-explorer/server/static
vi YangExplorer.html

var flashvars = {}; 
flashvars.host = '<ip-address>';
flashvars.port = '8088';

保存并退出

在启动脚本中更新 IP 地址

cd <install-root>/yang-explorer vi start.sh

(update HOST variable with <ip-address>)

保存并退出

./start.sh

注意:如果您在安装过程中没有使用 virtualenv,则可能需要 sudo。

启动资源管理器:

http://&lt;ip-address&gt;:8088/static/YangExplorer.html

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-01-08
    • 1970-01-01
    • 2014-12-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-02-10
    相关资源
    最近更新 更多