Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Changes between Version 4 and Version 5 of LighttpdIntegration


Ignore:
Timestamp:
12/29/05 12:23:37 (14 years ago)
Author:
anonymous
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • LighttpdIntegration

    v4 v5  
    1 This exchange was posted on the turbogears-discuss mailing list, and I wanted to make sure it didn't get lost. 
    2  
    3 I have '''not''' yet tested this, so be aware that it could be completely wrong. Please modify it if it's incorrect or if you just have improvements to suggest. 
    4  
    5 == 1. Simple proxy == 
    6 In the [http://groups.google.com/group/turbogears/browse_frm/thread/3fe6f4b79f0eee4c/ thread titled "lighttpd, Anyone?"], Elvelind Grandin posted his sample configuration for using lighttpd with TurboGears: 
    7  
    8 {{{ 
    9 $HTTP["host"] == "foo.org" { 
    10         proxy.server = ( "" => ( 
    11                         ( 
    12                                 "host" => "127.0.0.1", 
    13                                 "port" => 1082 
    14                                 ) 
    15                         ) 
    16         ) 
    17 } 
    18 }}} 
    19  
    20 In this example, TurboGears is running on port 1082, and lighttpd is running on port 80. Any HTTP request that comes in for the foo.org server is proxied to localhost:1082, and thus served up by TurboGears. Presumably (although I haven't tried this), you could let lighttpd serve up static pages by putting them in a different subdomain like "css.foo.org" or "images.foo.org". I'm sure there are also other configurations that could be tried -- perhaps someone will post them. 
    21  
    22 == 2. via SCGI == 
    23 It's also possible to run under SCGI using lighttpd using this [http://www.cherrypy.org/wiki/ScgiWsgi CherryPy recipe] and a matching config for lighttpd. 
    24  
    25 See also [http://cleverdevil.org/computing/34/ this blog post] on running TurboGears under lighttpd/WSGI/SCGI. 
    26  
    27 == 3. Improved Simple Proxy == 
    28  
    29 {{{ 
    30 $HTTP["host"] == "foo.org" { 
    31     server.document-root = "/path/to/your/foo-tg-project/" 
    32  
    33     $HTTP["url"] !~ "^/static" { 
    34  
    35         proxy.server = ( "" => ( 
    36                         ( 
    37                                 "host" => "127.0.0.1", 
    38                                 "port" => 1082 
    39                                 ) 
    40                         ) 
    41         ) 
    42 } 
    43 }}} 
    44  
    45 This rule will allow you to server all static files directly via Lighttpd. This way you can profit from both tools: lighttpd for his performance to serve static files and Turbogears for all dynamic elements. 
    46  
    47 This rule has the advantage that nothing must be changed into the Turobgears config files. 
    48  
    49 This rule has been tested and is implemented on my servers (william) 
     1This information has been moved into the real docs: http://www.turbogears.org/docs/deployment/lighttpd.html