[Answered ]-How is Django able to grant reserved port numbers?

1đź‘Ť

âś…

Port 80 has no magical meaning, it is not “reserved” or “privileged” on your server (besides most likely requiring root privileges to access, as others have mentioned). It is just a regular port that was chosen to be a default for http, so you don’t have to write google.com:80 every time in your browser, that’s it.

If you have no web server running such as apache or nginx which usually listen to that port, then port 80 is up for grabs. You can run django runserver on it, you can run a plain python script listening to it, whatever you like.

👤serg

1đź‘Ť

You should use a proper server instead of Django’s test server such as nginx or apache to run the server in production on port 80. Running something like sudo python manage.py runserver 0.0.0.0:80 is not recommended at all.

👤jamylak

Leave a comment