From c345211ac240d751f28177fa5ed2fb103c0e48b3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 11 May 2009 11:18:43 +0200 Subject: [PATCH] add config: lighttpd-zope-http-and-https Signed-off-by: Nico Schottelius --- configs/lighttpd-zope-http-and-https | 55 ++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 configs/lighttpd-zope-http-and-https diff --git a/configs/lighttpd-zope-http-and-https b/configs/lighttpd-zope-http-and-https new file mode 100644 index 00000000..fa16180a --- /dev/null +++ b/configs/lighttpd-zope-http-and-https @@ -0,0 +1,55 @@ +# +# 2009 Nico Schottelius (nico-configfiles at schottelius.org) +# +# This file is part of nsconfigfiles. +# +# nsconfigfiles is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# nsconfigfiles is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with nsconfigfiles. If not, see . +# +# +# Configuration file for lighttpd 1.4 to enable http and https +# proxying for Zope (in this case with plone) +# +# + +# Create SSL-Socket, do rewrite based on https + IP-number +$SERVER["socket"] == "62.65.138.66:443" { + ssl.engine = "enable" + ssl.pemfile = "/etc/lighttpd/ssl/nico.schottelius.org.pem" + + url.rewrite-once = ( "^/(.*)" => "/VirtualHostBase/https/nico.schottelius.org:443/cms/VirtualHostRoot/$1" ) + var.logdir = "/home/server/zope/logs/nico.schottelius.org/" + accesslog.filename = logdir + "access-ssl.log" + + # multiple zope backends + proxy.server = ( + "" => ( + ( "host" => "127.0.0.1", "port" => 9673 ), + ( "host" => "127.0.0.1", "port" => 9674 ) + ) + ) + +# Else rewrite to http, if it's the correct host name +} else $HTTP["host"] =~ "^(nico|nico2)\.schottelius\.org$" { + url.rewrite-once = ( "^/(.*)" => "/VirtualHostBase/http/nico.schottelius.org/cms/VirtualHostRoot/$1" ) + + var.logdir = "/home/server/zope/logs/nico.schottelius.org/" + accesslog.filename = logdir + "access.log" + + proxy.server = ( + "" => ( + ( "host" => "127.0.0.1", "port" => 9673 ), + ( "host" => "127.0.0.1", "port" => 9674 ) + ) + ) +}