HTTPS for meteohub
Posted: Wed Dec 09, 2009 7:31 pm
Hello,
I set up recently a HTTPS connection for my Meteohub server using stunnel. My server is an HP Thin Client running the X86 Meteohub server 4.5i. In case you might be interessed in, here is how I did it.
Stunnel4 installation
With Debian installer apt-get, this part is really easy. Just pay attention to the 4 at the end of stunnel or you will get the previous stunnel version.
Debian specific configuration
Edit /etc/default/stunnel4 and change
into
SSL configuration for Stunnel
In order to cypher connections, stunnel must have a SSL certificate. If you don't have yours, you can generate an autosigned certificated this way :
Stunnel4 configuration
Edit /etc/stunnel4/stunnel.conf and insert these lines :
At the end of the file, comment these lines avoid activating useless services.
And uncomment the [https] section :
[Re]start stunnel
You can now connect to your server with HTTPS.
I set up recently a HTTPS connection for my Meteohub server using stunnel. My server is an HP Thin Client running the X86 Meteohub server 4.5i. In case you might be interessed in, here is how I did it.
Stunnel4 installation
With Debian installer apt-get, this part is really easy. Just pay attention to the 4 at the end of stunnel or you will get the previous stunnel version.
Code: Select all
apt-get install stunnel4
Edit /etc/default/stunnel4 and change
Code: Select all
ENABLED=0
Code: Select all
ENABLED=1
In order to cypher connections, stunnel must have a SSL certificate. If you don't have yours, you can generate an autosigned certificated this way :
Code: Select all
cd /etc/stunnel4
openssl req -new -x509 -nodes -days 365 -out stunnel.pem -keyout stunnel.pem
Edit /etc/stunnel4/stunnel.conf and insert these lines :
Code: Select all
cert = /etc/stunnel/stunnel.pem
key = /etc/stunnel/stunnel.pem
Code: Select all
;[pop3s]
;accept = 995
;connect = 110
;[imaps]
;accept = 993
;connect = 143
;[ssmtp]
;accept = 465
;connect = 25
Code: Select all
[https]
accept = 443
connect = 80
TIMEOUTclose = 0
Code: Select all
/etc/init.d/stunnel4 restart