1 # Sample lighttpd configuration file for phpBB.
2 # Global settings have been removed, copy them
3 # from your system's lighttpd.conf.
4 # Tested with lighttpd 1.4.26
13 # If you have domains with and without www prefix,
14 # redirect one to the other.
15 $HTTP["host"] =~ "^(myforums\.com)$" {
17 ".*" => "http://www.%1$0"
21 $HTTP["host"] == "www.myforums.com" {
22 server.name = "www.myforums.com"
23 server.document-root = "/path/to/phpbb"
24 server.dir-listing = "disable"
26 index-file.names = ( "index.php", "index.htm", "index.html" )
27 accesslog.filename = "/var/log/lighttpd/access-www.myforums.com.log"
29 # Deny access to internal phpbb files.
30 $HTTP["url"] =~ "^/(config\.php|common\.php|includes|cache|files|store|images/avatars/upload)" {
31 url.access-deny = ( "" )
34 # Deny access to version control system directories.
35 $HTTP["url"] =~ "/\.svn|/\.git" {
36 url.access-deny = ( "" )
39 # Deny access to apache configuration files.
40 $HTTP["url"] =~ "/\.htaccess|/\.htpasswd|/\.htgroups" {
41 url.access-deny = ( "" )
44 fastcgi.server = ( ".php" =>
46 "bin-path" => "/usr/bin/php-cgi",
47 "socket" => "/tmp/php.socket",
50 "bin-environment" => (
51 "PHP_FCGI_CHILDREN" => "10",
52 "PHP_FCGI_MAX_REQUESTS" => "10000"
54 "bin-copy-environment" => (
55 "PATH", "SHELL", "USER"
57 "broken-scriptfilename" => "enable"