docs/lighttpd.sample.conf
changeset 0 ceef6d64c21d
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/docs/lighttpd.sample.conf	Wed Mar 07 16:41:10 2012 +0400
     1.3 @@ -0,0 +1,60 @@
     1.4 +# Sample lighttpd configuration file for phpBB.
     1.5 +# Global settings have been removed, copy them
     1.6 +# from your system's lighttpd.conf.
     1.7 +# Tested with lighttpd 1.4.26
     1.8 +
     1.9 +# Load moules
    1.10 +server.modules += ( 
    1.11 +	"mod_access",
    1.12 +	"mod_fastcgi",
    1.13 +	"mod_accesslog"
    1.14 +)
    1.15 +
    1.16 +# If you have domains with and without www prefix,
    1.17 +# redirect one to the other.
    1.18 +$HTTP["host"] =~ "^(myforums\.com)$" {
    1.19 +	url.redirect = (
    1.20 +		".*"	=> "http://www.%1$0"
    1.21 +	)
    1.22 +}
    1.23 +
    1.24 +$HTTP["host"] == "www.myforums.com" {
    1.25 +	server.name				= "www.myforums.com"
    1.26 +	server.document-root	= "/path/to/phpbb"
    1.27 +	server.dir-listing		= "disable"
    1.28 +	
    1.29 +	index-file.names		= ( "index.php", "index.htm", "index.html" )
    1.30 +	accesslog.filename		= "/var/log/lighttpd/access-www.myforums.com.log"
    1.31 +	
    1.32 +	# Deny access to internal phpbb files.	
    1.33 +	$HTTP["url"] =~ "^/(config\.php|common\.php|includes|cache|files|store|images/avatars/upload)" {
    1.34 +		url.access-deny = ( "" )
    1.35 +	}
    1.36 +
    1.37 +	# Deny access to version control system directories.
    1.38 +	$HTTP["url"] =~ "/\.svn|/\.git" {
    1.39 +		url.access-deny = ( "" )
    1.40 +	}
    1.41 +	
    1.42 +	# Deny access to apache configuration files.
    1.43 +	$HTTP["url"] =~ "/\.htaccess|/\.htpasswd|/\.htgroups" {
    1.44 +		url.access-deny = ( "" )
    1.45 +	}
    1.46 +
    1.47 +	fastcgi.server = ( ".php" => 
    1.48 +		((
    1.49 +			"bin-path" => "/usr/bin/php-cgi",
    1.50 +			"socket" => "/tmp/php.socket",
    1.51 +			"max-procs" => 4,
    1.52 +			"idle-timeout" => 30,
    1.53 +			"bin-environment" => ( 
    1.54 +				"PHP_FCGI_CHILDREN" => "10",
    1.55 +				"PHP_FCGI_MAX_REQUESTS" => "10000"
    1.56 +			),
    1.57 +			"bin-copy-environment" => (
    1.58 +				"PATH", "SHELL", "USER"
    1.59 +			),
    1.60 +			"broken-scriptfilename" => "enable"
    1.61 +		))
    1.62 +	)
    1.63 +}