You're accessing the development server over HTTPS, but it only supports HTTP.

4,549 views
Skip to first unread message

emmanuel odor

unread,
Sep 30, 2021, 5:43:05 AM9/30/21
to Django users
Hi Everyone,

I tried to run Django micro crm locally on my windows host and  whenever i run this on my browser i get these errors below.

Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
[30/Sep/2021 10:40:04] code 400, message Bad request version ('**\x13\x01\x13\x02\x13\x03À+À/À,À0̨̩À\x13À\x14\x00\x9c\x00\x9d\x00/\x005\x01\x00\x01\x93úú\x00\x00\x00\x17\x00\x00ÿ\x01\x
00\x01\x00\x00')
[30/Sep/2021 10:40:04] You're accessing the development server over HTTPS, but it only supports HTTP.

[30/Sep/2021 10:40:04] code 400, message Bad request version ('úú\x13\x01\x13\x02\x13\x03À+À/À,À0̨̩À\x13À\x14\x00\x9c\x00\x9d\x00/\x005\x01\x00\x01\x93ÚÚ\x00\x00\x00\x17\x00\x00ÿ\x01\x
00\x01\x00\x00')
[30/Sep/2021 10:40:04] You're accessing the development server over HTTPS, but it only supports HTTP.



Adeyemi Deji

unread,
Sep 30, 2021, 6:05:12 AM9/30/21
to django...@googlegroups.com
Make sure debug is set to True in settings.py file. allowed host should be an empty list

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/35a1ec5c-3b6e-4a3b-9d10-b3e1f8b48c94n%40googlegroups.com.

emmanuel odor

unread,
Sep 30, 2021, 6:28:16 AM9/30/21
to django...@googlegroups.com
I got this Invalid HTTP_HOST header: '127.0.0.1:8000'. You may need to add '127.0.0.1' to ALLOWED_HOSTS.
[30/Sep/2021 11:25:53] "GET / HTTP/1.1" 400 143

Emmanuel Odor    

Phone: +234-7037-411553
Mobile: +234-9055511066
Skype: Emmanuel Odor                                               
                                              24 Bajulaiye  Road, Shomolu,                                                                                        Lagos State.




Benjamin Schollnick

unread,
Sep 30, 2021, 6:28:28 AM9/30/21
to django...@googlegroups.com
FYI - Seems to have no effect on that error.  

From what I see the development server just doesn’t support SSL.

But, here are instructions on setting it up.


I have not yet tested these instructions, and also, I might suggest instead taking a look to see if it’s possible to get Let’s Encrypt to work with Django dev server?

Actually going further, I see:


Which appears to have been updated for Django 3.7 or so, and claims to have no outside dependencies, and a bit clearer documentation?
And describes how it could use a Let’s Encrypt key.  

I’m not sure which one I’m going to try…  But it does seem possible that a dev server can be updated easily to use SSL.

- Benjamin



emmanuel odor

unread,
Sep 30, 2021, 6:30:43 AM9/30/21
to django...@googlegroups.com

Bad Request (400)

Emmanuel Odor    

Phone: +234-7037-411553
Mobile: +234-9055511066
Skype: Emmanuel Odor                                               
                                              24 Bajulaiye  Road, Shomolu,                                                                                        Lagos State.



emmanuel odor

unread,
Sep 30, 2021, 7:36:56 AM9/30/21
to Django users
After following the instruction from this url 
https://github.com/teddziuba/django-sslserver

When i ran the the script i got this 


PS C:\Users\e\Documents\Projects\Crm> python manage.py runsslserver
Validating models...

System check identified no issues (0 silenced).
September 30, 2021 - 12:30:58
Django version 3.2.7, using settings 'crm.settings'
Starting development server at https://127.0.0.1:8000/
Using SSL certificate: C:\Users\e\Documents\Projects\Crm\venv\lib\site-packages\sslserver\certs\development.crt
Using SSL key: C:\Users\e\Documents\Projects\Crm\venv\lib\site-packages\sslserver\certs\development.key
Quit the server with CTRL-BREAK.
[30/Sep/2021 12:31:30] "GET / HTTP/1.1" 302 0
[30/Sep/2021 12:31:30] "GET /app/ HTTP/1.1" 404 179


ppp.png

emmanuel odor

unread,
Sep 30, 2021, 8:21:48 AM9/30/21
to django...@googlegroups.com
I am being routed here

Emmanuel Odor    

Phone: +234-7037-411553
Mobile: +234-9055511066
Skype: Emmanuel Odor                                               
                                              24 Bajulaiye  Road, Shomolu,                                                                                        Lagos State.



pp2.png

Kasper Laudrup

unread,
Sep 30, 2021, 1:54:45 PM9/30/21
to django...@googlegroups.com
On 30/09/2021 11.43, emmanuel odor wrote:
> Hi Everyone,
>
> I tried to run Django micro crm locally on my windows host and  whenever
> i run this on my browser i get these errors below.
>

Any reason you want to use HTTPS for your development server?

Why not simply access it through HTTP, ie. http://127.0.0.1:8000/ ?

You shouldn't use the development server for anything other than
development and (in general) only access it through a local host
connection, so there shouldn't really be any reason to use HTTPS.

Kind regards,

Kasper Laudrup
OpenPGP_0xE5D9CAC64AAA55EB.asc
OpenPGP_signature
Reply all
Reply to author
Forward
0 new messages