I deploy Django with Helicon Zoo and IIS
I have my Django project runs on localhost:xxxx My IIS goes live, the default site can be accessed by address However my Django project can't be accessed by IP:xxxx. It returns : Bad Request - Invalid Hostname HTTP Error 400. The request hostname is invalid.
How to make my Django site accessible by IP address? Or how to point the IP address directly to my Django project?
For the site to work on all addresses you need to:
It is also necessary to make sure that
settings.py
for your project hasALLOWED_HOSTS
record and it contains the domain name that is used to access your site. Here's the link to the Django docs: https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts