Feature #1272
closedRedirect from http to https problem on host
Description
Hi, I’m trying do redirect all requests from http to https on a citrine
virtual host and I get error, part for ssl is correctly configured, I
don’t get errors when I start lighttpd, this is a part of me
configuration file:
$HTTP["host"] == "something.my-domain.org" { server.document-root = "/var/www/htdocs/lm-sensors" url.redirect = ("http://something.my-domain.org/" => "https://something.my-domain.org/",) auth.backend = "plain" auth.backend.plain.userfile = "/etc/lighttpd/lighttpd.user" auth.require = ( "/" => ( "method" => "digest", "realm" => "LM_sensors", "require" => "valid-user" ) ) }
This works on firefox, but not on IE 6, I use lighttpd 1.4.16
Updated by jan over 17 years ago
- Status changed from New to Fixed
- Resolution set to worksforme
1) if you get an error, include it in the bug-report
2) the url.redirect takes a relative URL
url.redirect = ("^/" => "https://something.my-domain.org/")
Updated by siwyroot over 17 years ago
- Status changed from Fixed to Need Feedback
- Resolution deleted (
worksforme)
Hi, if I use url.redirect = ("^/" => "https://something.my-domain.org/")
in submitted configuration browser goes in to loop trying to view page.
Updated by darix over 17 years ago
- Status changed from Need Feedback to Fixed
- Resolution set to invalid
i appreciate that a bug is high priority just because you cant read the docs. the link is http://trac.lighttpd.net/trac/wiki/HowToRedirectHttpToHttps.
what you want is
$SERVER["socket"] == ":443" { # your ssl stuff here server.document-root = "/var/www/htdocs/lm-sensors" auth.backend = "plain" auth.backend.plain.userfile = "/etc/lighttpd/lighttpd.user" auth.require = ( "/" => ( "method" => "digest", "realm" => "LM_sensors", "require" => "valid-user" ) ) } else $HTTP["host"] == "something.my-domain.org" { url.redirect = (".*" => "https://something.my-domain.org$0",) }
the important part is the "else" in front of the $HTTPhost line.
Also available in: Atom