Feature #1272
Redirect from http to https problem on host
| Status: | Invalid | Start: | ||
| Priority: | Normal | Due date: | ||
| Assigned to: | - | % Done: | 0% |
|
| Category: | mod_redirect | |||
| Target version: | - | |||
| Pending: | No |
Resolution: | invalid |
|
| Patch available: |
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
History
08/17/2007 11:00 PM - jan
- 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/")
08/18/2007 11:40 AM - siwyroot
- 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.
08/18/2007 02:57 PM - darix
- 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.