Search code examples
network-programmingdjango-runserver

Can't access Django server from browser


I am working on a centOS7 server, I created a project and used python manage.py runserver command. From a browser on my local machine, I cannot access the localhost:8000 address.

I tried precising the address like python manage.py runserver 0.0.0.0:8000

Added also '*' to the ALLOWED HOSTS in settings.py

Nothing worked. I still can't access from the browser.

YOUR HELP WOULD BE MUCH APPRECIATED. Thanks.


Solution

  • If anyone experiences the same issue, the solution was to open port 8000 on server's firewall.

    Now I can access the server's address from my system.