Search code examples
pythondjangoremote-accessremote-server

How to run django remotely?


I'm running Yang Explorer in my remote Ubuntu Server.

I run it using start.sh in the repository.

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/

I would like to open the application in my browser using my machine. The IP address given for the server is 152.66.xx.xx


Solution

  • Running with ip-address (Shared server) Start Server:

    Determine using if-config

    Add ip-address/port in YangExplorer.html after following line:

    cd <install-root>/yang-explorer/server/static
    vi YangExplorer.html
    
    var flashvars = {}; 
    flashvars.host = '<ip-address>';
    flashvars.port = '8088';
    

    save & quit

    Update ip-address in startup script

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

    (update HOST variable with <ip-address>)
    

    save & quit

    ./start.sh

    Note: sudo may be required if you did not use virtualenv during installation.

    Start Explorer:

    http://<ip-address>:8088/static/YangExplorer.html