Project

General

Profile

FrequentlyAskedQuestions » History » Revision 2

Revision 1 (dg, 2005-05-23 20:00) → Revision 2/83 (dg, 2005-05-23 20:48)

= FAQs = 

 == Where to get help? == 

 IRC: [http://www.freenode.net/ freenode],    channel [irc://irc.freenode.net/lighttpd #lighttpd] 

 Mailing list: [http://lighttpd.net/documentation/ details], [http://news.gmane.org/gmane.comp.web.lighttpd archive]. 

 == General == 

 === Filenames with + in them work fine in Apache, but not in lighttpd === == 

 The + represents a ' ' (space) in URLs. Apache circumvents the missing URI escaping and tries to find the file with a '+' if the one with the ' ' could not be found.  

 Solution: Always escape URIs. In php you have [http://www.php.net/urlencode urlencode]. 

 === How do I bind to more than one address? === 

 Use server.bind and server.port to bind to the first port and then the $SERVER["socket"] conditional to bind to the rest (it will 'magically' bind to the specified socket). 

 Example that exposes /server-status to an internal IP only (note that it's perfectly valid to leave the body of the conditional empty): 
 {{{ 
 server.port = 80 
 server.bind = "192.0.2.1" 

 $SERVER["socket"] == "192.168.2.100:80" { 
    status.status-url = "/server-status" 
 } 
 }}} 

 This can also be combined with [http://www.lighttpd.net/documentation/ssl.html SSL]. 

 == FastCGI == 

 === Where is the spawn-php program/script available from? it's mentioned in docs but not available in the distributed package (1.3.7)    === 

 If you install lighttpd (http://lighttpd.net/download/INSTALL), the spawn-fcgi binary is installed automatically (to /usr/bin/spawn-fcgi by default). 

 The spawn-php.sh script can be found here: http://www.lighttpd.net/download/spawn-php.sh 

 === How do I exclude a certain directory from FastCGI? === 

 {{{ 
 $HTTP["url"] =~ "^/no-fcgi/" { 
    fastcgi.server = ( "/" => ... ) 
 } 
 }}} 

 You can also use server.error-handler-404 to redirect all non-existent files to FastCGI (see LighttpdOnRails for an example).