Cloudflare http to https redirect for Lighttpd -


i use cloudflare sites , need make default redirect http https. use lighttpd web server without ssl, wish use ssl of cloudflare.

i found article redirect http https don't now, how make lighttpd

add following lighttpd.conf file, assuming have added .pem , .crt files domain name. uses mod_rewrite under server.modules don't forget add mod_rewrite. lighttpd.conf file should @ server.modules section

server.modules = ( "mod_access", "mod_alias", "mod_compress", "mod_redirect", "mod_simple_vhost", "mod_setenv",     "mod_rewrite", ) 

at end of lighttpd.conf file, append rewrite http links https

$http["scheme"] == "http" { $http["host"] =~ ".*" {     url.redirect = (".*" => "https://%0$0")     } } 

alternatively can force cloudflare ssl going cloudflare domain settings. log in cloudflare account. under desired domain, go crypto, , change ssl setting full. should force connections ssl.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -