Reputation: 1368
I have made a Django app, am running it in Python with manage.py
, and accessing it with a URL
using ip:port
.
URL: 127.0.0.1:8000/admin/
Now I want to change ip:port
to a static url: http:/testapp.com/admin
.
I tried changing it in /etc/host
but it only changed the IP
as
127.0.0.1
testapp
Can I change the IP:PORT
to a name?
Upvotes: 2
Views: 11931
Reputation: 695
The only way you could do it is to run in Port 80
./manage.py runserver 127.0.0.1:80
Upvotes: 0
Reputation: 3562
Your only option is to run
./manage.py runserver 127.0.0.1:80
as superuser and then update your /etc/hosts
file to make testapp.com
point to 127.0.0.1
.
Upvotes: 2
Reputation: 10305
Nope... Only solution is to run in port
80
so 0.0.0.0:80 becomes testapp.com or whatever
Upvotes: 3