PDA

View Full Version : HTTP Admin Interface Reverse Proxy durch Lighttpd


Dimedo
25-01-2007, 11:57
English version of this thread is available here (http://forum.goteamspeak.com/showthread.php?p=151377).

Hallo,

Ich betreibe einen TeamSpeak 2 Linux Server (2.0.20.1) auf Debian GNU/Linux Etch (4.0 RC1) an einem MySQL (5.0.30-3) Backend mit leicht abgewandelten SQL Statement für Server-seitiges Passwort Hashing. Als Reverse Proxy möchte ich den Lighttpd HTTP Server (1.4.13) mit mod_proxy nutzen.

Mein Plan ist es, das TeamSpeak HTTP Admin Interface verschlysselt yber eine virtuelle Domain auf Port 443 (HTTPS) verfygbar zu machen, welcher sich allerdings von meinen Lighttpd HTTP Server in Benutzung befindet. Eine mögliche Lösung wäre Lighttpds Reverse Proxy Funktionalität zu nutzen, welche ich bereits fyr Admin Interfaces anderer Applikationen einsetze, was in diesen Fällen auch wunderbar funktioniert.

Nachdem ich den Proxy fyr das TeamSpeak Admin Interface in genau der gleichen Art und Weise konfiguriert hatte, wie ich es zuvor auch bei den anderen Admin Interfaces erfolgreich getan hatte, probierte ich yber HTTPS auf meine virtuelle Domain zuzugreifen, was in einer leeren Antwort bis zum Timeout endete. Lighttpd gibt im mod_proxy Debug Modus ein paar Informationen zu diesem Thema aus, aber ich werde nicht wirklich schlau daraus.

Sollte jemand Erfahrungen mit diesem Thema haben oder eine Idee, wäre ich froh eine Antwort zu erhalten. Ich habe eine Kopie dieses Threads im Lighttpd Forum geposted. Diese kann hier (http://forum.lighttpd.net/topic/4833) gefunden werden (Englische Sprache).

Ein Ausschnitt aus dem besagten Debug Logfile:

2007-01-25 11:08:02: (mod_proxy.c.1079) proxy - start
2007-01-25 11:08:02: (mod_proxy.c.1115) proxy - ext found
2007-01-25 11:08:02: (mod_proxy.c.1123) proxy - used hash balancing, hosts: 1
2007-01-25 11:08:02: (mod_proxy.c.1138) proxy - election: / 123.123.123.123 teamspeak.mydomain.tld 1759253629
2007-01-25 11:08:02: (mod_proxy.c.1239) proxy - found a host 123.123.123.123 14534
2007-01-25 11:08:02: (mod_proxy.c.1079) proxy - start
2007-01-25 11:08:02: (mod_proxy.c.1115) proxy - ext found
2007-01-25 11:08:02: (mod_proxy.c.1123) proxy - used hash balancing, hosts: 1
2007-01-25 11:08:02: (mod_proxy.c.1138) proxy - election: / 123.123.123.123 teamspeak.mydomain.tld 1759253629
2007-01-25 11:08:02: (mod_proxy.c.1239) proxy - found a host 123.123.123.123 14534
2007-01-25 11:08:02: (mod_proxy.c.377) connect delayed: 11
2007-01-25 11:08:02: (mod_proxy.c.993) proxy: fdevent-out 1
2007-01-25 11:08:02: (mod_proxy.c.804) proxy - connect - delayed success
2007-01-25 11:08:02: (mod_proxy.c.960) proxy: fdevent-in 4
2007-01-25 11:08:02: (mod_proxy.c.645) proxy - have to read: 165
2007-01-25 11:08:02: (mod_proxy.c.960) proxy: fdevent-in 4
2007-01-25 11:08:02: (mod_proxy.c.645) proxy - have to read: 2709
2007-01-25 11:09:34: (mod_proxy.c.1079) proxy - start
2007-01-25 11:09:34: (mod_proxy.c.1079) proxy - start
2007-01-25 11:09:35: (mod_cgi.c.553) cgi died, pid: 19835
2007-01-25 11:10:34: (mod_proxy.c.1079) proxy - start
2007-01-25 11:10:34: (mod_proxy.c.1079) proxy - start
2007-01-25 11:10:35: (mod_cgi.c.553) cgi died, pid: 19901
2007-01-25 11:11:34: (mod_proxy.c.1079) proxy - start
2007-01-25 11:11:34: (mod_proxy.c.1079) proxy - start
2007-01-25 11:11:34: (mod_cgi.c.553) cgi died, pid: 19957


Ein Ausschnitt aus der Lighttpd Konfiguration:

server.modules += ( "mod_proxy" )
proxy.debug = 1
proxy.balance = "hash"

$SERVER["socket"] == "123.123.123.123:80" {

$HTTP["host"] == "teamspeak.mydomain.tld" {
url.redirect = ( "^/(.*)" => "https://teamspeak.mydomain.tld/$1" )
}

}

$SERVER["socket"] == "123.123.123.123:443" {
ssl.engine = "enable"
ssl.pemfile = "/path/to/my/cert.pem"
ssl.ca-file = "/path/to/my/ca.crt"

$HTTP["host"] == "teamspeak.mydomain.tld" {
server.name = "teamspeak.mydomain.tld"
proxy.server = ( "" =>
(
( "host" => "123.123.123.123", "port" => 14534 )
)
)
}

}

Dimedo
16-02-2007, 17:58
Ich denke, da keiner geantwortet hat, darf ich mir erlauben das Thema mal wieder hochzupushen.