Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing localhost to public IP in a VM

I am testing RTD to build our API docs implementation, so running a local installation of RTD in a virtualenv within a debian VM. The ./manage.py runserver command runs the RTD server successfully.

Validating models...

0 errors found
March 25, 2015 - 03:11:57
Django version 1.6.10, using settings 'settings.sqlite'
Starting development server at http://127.0.0.1:8000/

To access the RTD admin console from my laptop browser (outside the VM) I would like to change the localhost to the public IP. For that, I changed the IP references in:

  • /etc/hosts
  • settings/sqlite.py (section Internal_ips, and a few other occurrences)

But, it continues to build the server at http://127.0.0.1:8000/

Where should I be configuring this? What else should I be doing?

like image 568
MonamiB Avatar asked Jan 01 '26 04:01

MonamiB


1 Answers

RESOLVED

Run the RTD server as:

./manage.py runserver 0.0.0.0:8000

OR

./manage.py runserver [VM IP ADDRESS]:8000
like image 74
MonamiB Avatar answered Jan 04 '26 00:01

MonamiB



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!