Hii Everyone


I have a Django App which I want to deploy on a Centos Linux server having
a global/public IP which is assigned to a domain and is secured with SSL
<https://stackoverflow.com/questions/72990799/how-to-deploy-django-app-on-centos-server-having-domain-secured-with-ssl>
.

The System configuration is as:

centos-release-6-10.el6.centos.12.3.x86_64

Apache/2.2.15 (CentOS)

When I run the server using:

python manage.py runserver 0.0.0.0:8000,

then it is only accessible from the browser by passing a local IP say

http://192.xxx.xx.xxx:8000/django_app/home

But I want to access it from the public/global IP, but it gives an error
when I replace the local IP with Global/Public IP or domain assigned to the
public IP as:

105.168.296.58 took too long to respond.

Try:



Checking the connection

Checking the proxy and the firewall

Running Windows Network Diagnostics

ERR_CONNECTION_TIMED_OUT

When I simply put this public IP in the browser as https://105.168.296.58 then
it redirects the browser to the app/website say
https://mywebsite.com/home which
is running at port 80 on Apache, and shows the assigned domain instead of
IP, so IP is working fine.

in settings.py: all hosts are allowed as ALLOWED_HOSTS = ['*']

Methods tried are:

1.       by using <https://stackoverflow.com/a/30760639/14758388>
django-extensions as:

python manage.py runserver_plus --cert certname 0.0.0.0:8000

2.       by using <https://stackoverflow.com/a/68070398/14758388>
django-sslserver as:

python manage.py runsslserver 0.0.0.0:8000

The app runs from both of these methods only locally at
http://192.xxx.xx.xxx:8000/django_app/home, but None of them worked from a
Public IP.

Kindly tell, How to deploy or configure this Django App to Run Outside the
Local Network?


Thanks

*Dr. Abhilash Singh Chauhan*

*Project Scientist-B*

*Agromet Advisory Service Division (AASD)*

*India Meteorological Department (IMD)*


*Mausam Bhawan, Lodhi Road New Delhi – 110003*

*Contact no: +91-9416372068*


* <https://www.researchgate.net/profile/Abhilash_Singh_Chauhan>
<https://scholar.google.com/citations?hl=en&user=8C9pcqsAAAAJ>
<https://m.facebook.com/abhilash.chauhan>*

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAB0sGggcFAYwLuRpee64E1S6w8SEsu1tjzbJGyr0ZkP2SHHqMg%40mail.gmail.com.

Reply via email to