[Kimchi-devel] [HELP] Problems with lighttpd
Ramon Medeiros
ramonn at linux.vnet.ibm.com
Wed Jan 14 14:01:16 UTC 2015
Hi Team,
i'm trying to switch from nginx to lighttpd as kimchi proxy. I
successfully create the proxy on port 8001, but the problem is the
redirection from http to https.
To try this, do:
1) Install lighttpd
2) Start kimchi, kill nginx process
3) Run lighttpd with this configuration (save to /etc/kimchi/lighttpd.conf):
# Variables
var.log_root = "/var/log/lighttpd"
var.server_root = "/var/www"
var.state_dir = "/var/run"
var.home_dir = "/var/lib/lighttpd"
var.conf_dir = "/etc/lighttpd"
var.vhosts_dir = server_root + "/vhosts"
var.cache_dir = "/var/cache/lighttpd"
var.socket_dir = home_dir + "/sockets"
# Server settings
server.username = "lighttpd"
server.groupname = "lighttpd"
server.document-root = server_root + "/lighttpd"
server.pid-file = state_dir + "/lighttpd.pid"
server.errorlog = log_root + "/error.log"
# Server modules
server.modules = (
"mod_proxy",
"mod_redirect",
"mod_accesslog",
)
# debug settings
debug.log-request-handling = "enable"
debug.log-request-header = "enable"
debug.log-request-header-on-error = "enable"
debug.log-response-header = "enable"
debug.log-file-not-found = "enable"
debug.log-condition-handling = "enable"
# VIRTUAL HOSTS
# Main server
$SERVER["socket"] == ":8001" {
server.port = 8001
ssl.engine = "enable"
ssl.pemfile = "/etc/kimchi/kimchi.pem"
# server.document-root = server_root + "/lighttpd"
proxy.debug = 1
proxy.server = ( "" => ( ( "host" => "127.0.0.1", "port" => 8010 )))
}
# redirect from http to https
$SERVER["socket"] == ":8000" {
server.port = 8000
server.document-root = server_root + "/lighttpd"
$HTTP["host"] =~ "[^0-9:]*" {
url.redirect = ("[^0-9:]*" => "https://%0:8001$0")
}
}
4) Run with /usr/sbin/lighttpd -D -f /etc/kimchi/lighttpd.conf.
You will can access https://localhost:8001 with no problems, but, if you
try to access localhost:8000, you will be redirect to
https://127.0.0.1:8010.
I did not understand why this is happening. Can someone please take a look?
--
Ramon Nunes Medeiros
Kimchi Developer
Software Engineer - Linux Technology Center Brazil
IBM Systems & Technology Group
Phone : +55 19 2132 7878
ramonn at br.ibm.com
More information about the Kimchi-devel
mailing list