Using port 80 with Django's runserver command · Thinker's Tech Tips

Thinker's Tech Tips

A web developer blog

January 27, 2015

Using port 80 with Django's runserver command

pythondjangorunserver

If you want to test your Django application on port 80, you would probably do something like this

python manage.py runserver yourdomain.com:80

Unfortunately, this would not work. It would cause an error.

To force the usage of port 80, make sure you follow this steps

  1. Make sure that no other application is using port 80. Examples of applications that do are local webservers like Apache and Tomcat. Here are some tips to check what programs are running on port 80 in Windows, Linux and Mac

  2. After verifying that there no other application is using port 80, run the command above as root

sudo python manage.py runserver yourdomain.com:80

Important: Only use this tip for testing purposes only.