[Django]-Django: Run django app on server without port?

4👍

According to the discussion in the comment, sounds like you are confused about why do you need to explicitly specify the port. For http service the default port is 80, for https service, the default port is 443. When you are accessing the domain without the port, the request will by default try to hit either one depend on which method you use. You should on your apache setting specify the port to be 80 for http or 443 https. Hope that helps.

3👍

You can run the Django app without using the port as below.

Stop all the services that are running under port 80. Specify your IP address / your domain name in the settings file under

ALLOWED_HOSTS = ['IPadress/domainname']

Execute the following command

python manage.py runserver 0:80

Now run your application in the web browser as x.x.x.x (IP or domain name)

0👍

Stop all the services that are running under port 80

as tuomastik told, and maybe someone dont know how to do

How do I kill the process currently using a port on localhost in Windows?

remember to editting

> ALLOWED_HOSTS

in setting.py, as tuomastik told, and open port in firewall in server

> python manage.py runserver 0.0.0.0:80

but this

> For http service the default port is 80, for https service, the
> default port is 443

as Shang Wang told, is the most important (for me)

Leave a comment