I have not used ubuntu much, only when I have to deploy a web. Right now I am trying to deploy a python django web, but I have an issue with ip address.
So, I tried python manage.py runserver
at first, and it gave timed-out errors. Server address, which I was told by my supervisor and which I can only access via putty, is xxx.yy.zzz.aaa. When I tried to deploy my python django web specifically to this address by using python manage.py runserver xxx.yy.zzz.aaa:8000
, I get an error saying
that ip address can't be assigned to.
I used few other ports like 8001, but still it did not work.
So, I used the following command to see what ip address is.
ifconfig
And I got three addresses: one is localhost (127.0.0.1), the other is related to docker, which I did not create. The third is under hostname enp---, but it is not xxx.yy.zzz.aaa. It is completely different one.
So, then, I googled some more and I used the following command.
curl https://ipinfo.io/ip
Then, I get the "correct" address xxx.yy.zzz.aaa.
I do not know much about network and ip in ubuntu, but can ubuntu have different ip's besides docker ip address? If so, then how can I set the ip address so that I can use xxx.yy.zzz.aaa to deploy python django web?