2
# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
3
# See LICENSE for details.
6
# This web server makes it possible to put it behind a reverse proxy
7
# transparently. Just have the reverse proxy proxy to
8
# host:port/vhost/http/external-host:port/
9
# and on redirects and other link calculation, the external-host:port will
10
# be transmitted to the client.
12
from twisted.internet import reactor
13
from twisted.web import static, server, vhost, twcgi, script, trp
15
root = static.File("static")
17
'.cgi': twcgi.CGIScript,
18
'.php3': twcgi.PHP3Script,
19
'.php': twcgi.PHPScript,
20
'.epy': script.PythonScript,
21
'.rpy': script.ResourceScript,
22
'.trp': trp.ResourceUnpickler,
24
root.putChild('vhost', vhost.VHostMonsterResource())
25
site = server.Site(root)
26
reactor.listenTCP(1999, site)