Forward HTTP to HTTPS

On various Hardware and OS systems: pi / windows / routers / nas, etc

Moderator: leecollings

Post Reply
beejee78
Posts: 6
Joined: Monday 11 April 2016 21:23
Target OS: Windows
Domoticz version:
Contact:

Forward HTTP to HTTPS

Post by beejee78 »

I've created a HTTPS certificate with letsencrypt for my domain now and it's working good when i connect to https://<my-domain>

But i always have to type https:// in front of my domain name. Is it possible to redirect to https automatically.
I searched everywhere but can't find an answer.

Thanx in advance!

BTW: Domoticz is running on an RPI.
beejee78
Posts: 6
Joined: Monday 11 April 2016 21:23
Target OS: Windows
Domoticz version:
Contact:

Re: Forward HTTP to HTTPS

Post by beejee78 »

Ok, but how do i do that?
There's nothing behind port 80 btw.
beejee78
Posts: 6
Joined: Monday 11 April 2016 21:23
Target OS: Windows
Domoticz version:
Contact:

Re: Forward HTTP to HTTPS

Post by beejee78 »

Thanx!
Is all this not possible with the build-in webserver from Domoticz itself?
Electrocut
Posts: 22
Joined: Sunday 04 May 2014 21:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Forward HTTP to HTTPS

Post by Electrocut »

Another option would be to add "HTTP Strict Transport Security" (HSTS) header to your web server.

With this header set, if you type http://domain in your address bar, your browser will automatically switch to https://domain, without even trying to contact the http://domain server.
beejee78
Posts: 6
Joined: Monday 11 April 2016 21:23
Target OS: Windows
Domoticz version:
Contact:

Re: Forward HTTP to HTTPS

Post by beejee78 »

Electrocut wrote: Friday 27 October 2017 16:55 Another option would be to add "HTTP Strict Transport Security" (HSTS) header to your web server.

With this header set, if you type http://domain in your address bar, your browser will automatically switch to https://domain, without even trying to contact the http://domain server.
Sounds good. Is this possible in Domoticz?
User avatar
gizmocuz
Posts: 3026
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Forward HTTP to HTTPS

Post by gizmocuz »

What you want to do could be done with NGINX as a proxy
Quality outlives Quantity!
beejee78
Posts: 6
Joined: Monday 11 April 2016 21:23
Target OS: Windows
Domoticz version:
Contact:

Re: Forward HTTP to HTTPS

Post by beejee78 »

Okay, I think I need NGINX at least. I will look at it, thank you!
essayreviews
Posts: 1
Joined: Thursday 09 November 2017 5:54
Target OS: Linux
Domoticz version:
Contact:

Re: Forward HTTP to HTTPS

Post by essayreviews »

good post.how to covert the http to https.I need the https certificate,because the https is most valuable for site.how to convert that.
Post Reply