This site can’t be reached 127.0.0.1 refused to connect.

185 views
Skip to first unread message

Avitab Ayan Sarmah

unread,
Jun 5, 2018, 11:38:46 AM6/5/18
to Django users
While going through the turolal 7 of the django project, couldn't connect to the url.Please comment why my local host refused to connect

Jamie Roberts

unread,
Jun 5, 2018, 3:55:43 PM6/5/18
to django...@googlegroups.com
Hi,

This is from memory and may not be your problem but ... I had to add 127.0.0.1 to ALLOWED_USERS in settings.py

Sent from my iPhone

On 5 Jun 2018, at 16:38, Avitab Ayan Sarmah <avita...@gmail.com> wrote:

While going through the turolal 7 of the django project, couldn't connect to the url.Please comment why my local host refused to connect

--
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 django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e948142e-163f-4a82-bc91-46c16c292c5d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

James Farris

unread,
Jun 5, 2018, 9:34:06 PM6/5/18
to django...@googlegroups.com
What’s the actual error? 

Did you mean ALLOWED_HOSTS? If so you can just add:
ALLOWED_HOSTS=[‘*’]

Илья Барков

unread,
Jun 8, 2018, 9:34:58 AM6/8/18
to django...@googlegroups.com
I had a similar problem in Firefox, in other browsers everything worked well. Cleared the cache and cookies!

2018-06-06 4:33 GMT+03:00 James Farris <jamesa...@gmail.com>:
What’s the actual error? 

Did you mean ALLOWED_HOSTS? If so you can just add:
ALLOWED_HOSTS=[‘*’]
On Tue, Jun 5, 2018 at 12:55 PM Jamie Roberts <jamie.ro...@gmail.com> wrote:
Hi,

This is from memory and may not be your problem but ... I had to add 127.0.0.1 to ALLOWED_USERS in settings.py

Sent from my iPhone

On 5 Jun 2018, at 16:38, Avitab Ayan Sarmah <avita...@gmail.com> wrote:

While going through the turolal 7 of the django project, couldn't connect to the url.Please comment why my local host refused to connect

--
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 django-users+unsubscribe@googlegroups.com.

--
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 django-users+unsubscribe@googlegroups.com.

--
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 django-users+unsubscribe@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

Parul.

unread,
Dec 18, 2020, 11:29:29 AM12/18/20
to Django users
Hi,
I am also facing this issue
tried   I had to add 127.0.0.1 to ALLOWED_USERS in settings.py but still issue not resolved, also tried '*' in ALLOWED_HOSTS... 
used 0.0.0.0:8000/8080 as well...still facing that issue
can anybody please help

On Friday, June 8, 2018 at 7:04:58 PM UTC+5:30 Илья Барков wrote:
I had a similar problem in Firefox, in other browsers everything worked well. Cleared the cache and cookies!

2018-06-06 4:33 GMT+03:00 James Farris <jamesa...@gmail.com>:
What’s the actual error? 

Did you mean ALLOWED_HOSTS? If so you can just add:
ALLOWED_HOSTS=[‘*’]
On Tue, Jun 5, 2018 at 12:55 PM Jamie Roberts <jamie.ro...@gmail.com> wrote:
Hi,

This is from memory and may not be your problem but ... I had to add 127.0.0.1 to ALLOWED_USERS in settings.py

Sent from my iPhone

On 5 Jun 2018, at 16:38, Avitab Ayan Sarmah <avita...@gmail.com> wrote:

While going through the turolal 7 of the django project, couldn't connect to the url.Please comment why my local host refused to connect

--
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 django-users...@googlegroups.com.

--
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 django-users...@googlegroups.com.

--
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 django-users...@googlegroups.com.

Parul.

unread,
Dec 18, 2020, 11:38:14 AM12/18/20
to django...@googlegroups.com
I tried ALLOWED_HOSTS['*']
Still not working 

CHRISTO KRIEGLER

unread,
Dec 18, 2020, 12:12:55 PM12/18/20
to django...@googlegroups.com
Hi, guys.

I'm not working in django, but if you go to your hosts file then you need to set the IP address (domain name) and port in there that you going to use. The server then will pick up the IP address that you set for your project.

Blessings

Christo Kriegler

Founder / President

Management | Advertron

+2787 073 5706 | +2782 440 7831
chr...@advertron.co.za
www.advertron.co.za


Reply all
Reply to author
Forward
0 new messages