KfWiki : Lighttpd

HomePage :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register

Revision [2086]

Most recent edit made on 2008-11-13 19:46:47 by WikiAdmin

Additions:
./configure --prefix=/usr --sysconfdir=/etc/lighttpd --disable-ipv6 --with-openssl=/usr


Deletions:
./configure --prefix=/usr --sysconfdir=/etc/lighttpd --disable-ipv6




Revision [1873]

Edited on 2008-08-05 23:59:45 by WikiAdmin

Additions:
SSL
Check that lighttpd has ssl support
> lighttpd -v
lighttpd-1.4.13 (ssl) - a light and fast webserver
Then add these to lighttpd.conf. No need to add 443 to server.port
$SERVER["socket"]
"206.188.19.110:443" { ssl.engine = "enable"
ssl.pemfile = "/etc/lighttpd/ssl/web.adblade.com.pem"
ssl.ca-file = "/etc/lighttpd/ssl/gd_bundle.crt"
server.name = "web.adblade.com"
server.document-root = "/home/admin/httpdocs"




Revision [1839]

Edited on 2008-07-22 19:42:19 by WikiAdmin

Additions:
evhost vhost
evhost is a very powerful vhost configuration tool. if one doesn't wrap the evhost directive around with a socket match, it will serve request for 0.0.0.0:*. Not a problem if all the sites are ran on the same IP and no SSL sites are served. Otherwise, the following example uses evhosts in conjunction with simple vhost to serve plain and secure sites:
$SERVER["socket"]
"0.0.0.0:80" {
evhost.path-pattern = "/home/sites/www.%0/web/"
$SERVER["socket"]
"1.2.3.4:443" {
ssl.engine = "enable"
ssl.pemfile = "/home/sites/www.domain.tld.pem"
server.document-root = "/home/sites/www.domain.tld/web"
evhost variable:
%0 => domain name + tld
%1 => tld
%2 => domain name without tld
%3 => subdomain 1 name
%4 => subdomain 2 name




Revision [1797]

Edited on 2008-07-04 02:25:13 by WikiAdmin

Additions:
simple vhost
$HTTP["host"] =~ "domain1\.com" {
server.document-root = "/home/lighttpd/domain1.com/http"
accesslog.filename = "/home/lighttpd/domain1.com/logs/access.log"




Revision [1701]

Edited on 2008-04-24 21:05:21 by WikiAdmin

Additions:

$HTTP["querystring"]
"page=home" {
$HTTP["url"] =~ "^/home.html" {
url.redirect = ( "^/(.*)" => "/index.html" )
}
}




Revision [1639]

Edited on 2008-04-12 07:55:23 by WikiAdmin

Additions:

(
"socket" => "/tmp/php-fastcgi.socket",
"bin-path" => "/usr/local/php-fcgi/bin/php"
)
server.modules += ( "mod_proxy_core", "mod_proxy_backend_ajp13" )
url.redirect = ( "(.*)" => "www.mentalhelp.net$1" )


Deletions:

(
"socket" => "/tmp/php-fastcgi.socket",
"bin-path" => "/usr/local/php-fcgi/bin/php"
)
server.modules += ( "mod_proxy_backend_ajp13" )
url.redirect = ( "(.*)" => "www.mentalhelp.net$1" )




Revision [1425]

Edited on 2008-02-28 23:29:46 by WikiAdmin

Additions:
Redirect
$HTTP["url"] !~ "^/admin" {
url.redirect = ( "(.*)" => "www.mentalhelp.net$1" )
}




Revision [985]

Edited on 2007-09-28 00:23:22 by WikiAdmin

No differences.


Revision [984]

Edited on 2007-09-28 00:22:05 by WikiAdmin

Additions:
php (lighttpd 1.5+)
Run a fastcgi background process, and use mod_proxy to connect to it.
/usr/bin/spawn-fcgi -s /tmp/php-fastcgi.sock -f /usr/bin/php-cgi -uwww -g www -C 5 -P /var/run/spawn-fcgi.pid
%%(apache;lighttpd.conf)
server.modules += ( "mod_proxy_backend_fastcgi" )
$HTTP["url"] =~ "\.php$" {
proxy-core.balancer = "round-robin"
proxy-core.allow-x-sendfile = "enable"
# proxy-core.check-local = "enable"
proxy-core.protocol = "fastcgi"
proxy-core.backends = ( "unix:/tmp/php-fastcgi.sock" )
proxy-core.max-pool-size = 16




Revision [983]

Edited on 2007-09-27 23:07:42 by WikiAdmin

Additions:
Tomcat (lighttpd 1.5+)


Deletions:
Tomcat




Revision [982]

Edited on 2007-09-27 23:05:40 by WikiAdmin

Additions:
php
fastcgi.server = ( ".php" =>
( "localhost" =>
(
"socket" => "/tmp/php-fastcgi.socket",
"bin-path" => "/usr/local/php-fcgi/bin/php"
)
)
)
Tomcat
server.modules += ( "mod_proxy_backend_ajp13" )
$HTTP["url"] =~ "^/tomcat/" {
proxy-core.balancer = "round-robin"
proxy-core.protocol = "ajp13"
proxy-core.backends = ( "localhost:8009" )
proxy-core.max-pool-size = 16
}




Revision [981]

The oldest known version of this page was edited on 2007-09-27 23:04:45 by WikiAdmin
HomePage » WebServer » Lighttpd


Lighttpd

lighttpd seems to be picking up momentum as a high performance alternative to apache.

Installation
Configure options:
./configure --prefix=/usr --sysconfdir=/etc/lighttpd --disable-ipv6 


Configuration
One can use the sample config under lighttpd-src/docs/lighttpd.conf and make modifications.

Starting
lighttpd -f /etc/lighttpd/lighttpd.conf
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki
Page was generated in 0.2056 seconds