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)
- [Django]-Django signals redirect
- [Django]-Cannot concatenate 'str' and 'tuple' objects – Django – johnny cache
- [Django]-Distinct values with Q objects
- [Django]-Django ValueError: Field 'id' expected a number but got 'S'
- [Django]-Django – How to add custom error message in Form?
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)
- [Django]-Save memory in Python. How to iterate over the lines and save them efficiently with a 2million line file?
- [Django]-Using Django and Bootstrap Studio together