| 42 | lighttpd Config: :: |
| 43 | You will need to install `lua` >= 5.1 and make sure lighttpd is compiled with lua support. Lua will perform URL rewriting since lighty doesn't support it natively. |
| 44 | {{{ |
| 45 | server.modules += ( "mod_proxy" ) |
| 46 | server.modules += ( "mod_magnet" ) |
| 47 | server.modules += ( "mod_setenv" ) |
| 48 | $HTTP["url"] =~ "^/deluge/" { |
| 49 | setenv.add-request-header = ( "X-Deluge-Base" => "/deluge/" ) |
| 50 | magnet.attract-raw-url-to = ( "/etc/lighttpd/lua/deluge.lua" ) |
| 51 | proxy.server = ( "" => ( "deluge" => ( "host" => "127.0.0.1", "port" => 8112 ) ) ) |
| 52 | }}} |
| 53 | |
| 54 | `/etc/lighttpd/lua/deluge.lua` |
| 55 | {{{ |
| 56 | lighty.env["request.uri"] = string.sub(lighty.env["request.uri"], string.len('/deluge/')) |
| 57 | return |
| 58 | }}} |
| 59 | |