Feature #2488
closedRedirect http to https at the same port
Description
Hello,
we have non-standart configuration , our lighttpd server work at port 8888 with ssl. We work at this port with SSL ( for example - https://1.1.1.1:8888 ) and we need to redirect all traffic from http ( http://1.1.1.1:8888 ) to httpS ( httpS://1.1.1.1:8888 ). We found your instruction to trafic redirect - http://redmine.lighttpd.net/projects/1/wiki/HowToRedirectHttpToHttps , but with this instruction we get error :
2013-06-08 18:46:04: (connections.c.305) SSL: 1 error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request
2013-06-08 19:04:05: (connections.c.305) SSL: 1 error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request
2013-06-08 21:19:00: (connections.c.305) SSL: 1 error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request
2013-06-08 21:19:03: (connections.c.305) SSL: 1 error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request
2013-06-08 21:19:03: (connections.c.305) SSL: 1 error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request
2013-06-08 21:19:03: (connections.c.305) SSL: 1 error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request
2013-06-08 21:19:03: (connections.c.305) SSL: 1 error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request
Our lighttpd config :
server.document-root = "/var/www/user/site"
server.modules = (
"mod_access",
"mod_alias",
"mod_redirect",
"mod_rewrite"
)
server.port = 8888
ssl.engine = "enable"
ssl.pemfile = "/etc/lighttpd/ssl/server.pem"
url.rewrite-once = (
"^/favicon.ico" => "/favicon.ico",
"^/js/(.*)$" => "/js/$1",
"^/css/(.*)$" => "/css/$1",
"^/themes/(.*)$" => "/themes/$1"
)
url.rewrite-once += ( "^/phpmyadmin(.*)$" => "/phpmyadmin$1" )
url.rewrite-once += ( "^/roundcube(.*)$" => "/roundcube$1" )
url.rewrite-once += ( "^/squirrelmail(.*)$" => "/squirrelmail$1" )
url.rewrite-once += ( "^(.*)$" => "index.php$1" )
alias.url = ( "/phpmyadmin" => "/usr/share/phpmyadmin/" )
alias.url += ( "/roundcube" => "/usr/share/roundcube/" )
alias.url += ( "/squirrelmail" => "/usr/share/squirrelmail/" )
max-proc = 1
auth.debug = 2
auth.backend = "htpasswd"
auth.backend.htpasswd.userfile = "/var/www/.htpasswd"
auth.require = ( "/" => ( "method" => "basic", "realm" => "Restricted access", "require" => "valid-user" ) )
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
server.errorlog = "/var/log/lighttpd/error.log"
server.pid-file = "/var/run/lighttpd.pid"
server.username = "myuser"
server.groupname = "myuser"
index-file.names = ( "index.php", "index.html",
"index.htm", "default.htm",
" index.lighttpd.html" )
url.access-deny = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
dir-listing.encoding = "utf-8"
server.dir-listing = "enable"
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
$HTTP["url"] =~ "^/index.php/myfiles" {
fastcgi.server = ( ".php" =>
( "localhost" =>
(
"socket" => "/var/run/site/php-fastcgi.user.socket",
"bin-path" => "/var/www/user/php-bin/myuser.sh",
"max-procs" => 1,
) ) )
}
Updated by stbuehler almost 12 years ago
- Status changed from New to Invalid
- Target version deleted (
1.4.x)
While it is theoretically possible to run http and https on the same port I do not intend to support this in any way. (Also I don't know any other webserver that would support this. See http://stackoverflow.com/a/11183861/1478356)
So you can't redirect http to https on the same port with lighttpd.
Updated by vaganov.nikolai almost 12 years ago
nginx can redirect it with error page - http://mailman.nginx.org/pipermail/nginx/2008-June/005659.html
Updated by vaganov.nikolai almost 12 years ago
- Assignee set to stbuehler
It is possible develop this feature for additional cost ?
Updated by vaganov.nikolai almost 12 years ago
We need one port for correct redirection from http to https.
Also available in: Atom