|
indvdum@0
|
1 |
# Sample lighttpd configuration file for phpBB.
|
|
indvdum@0
|
2 |
# Global settings have been removed, copy them
|
|
indvdum@0
|
3 |
# from your system's lighttpd.conf.
|
|
indvdum@0
|
4 |
# Tested with lighttpd 1.4.26
|
|
indvdum@0
|
5 |
|
|
indvdum@0
|
6 |
# Load moules
|
|
indvdum@0
|
7 |
server.modules += (
|
|
indvdum@0
|
8 |
"mod_access",
|
|
indvdum@0
|
9 |
"mod_fastcgi",
|
|
indvdum@0
|
10 |
"mod_accesslog"
|
|
indvdum@0
|
11 |
)
|
|
indvdum@0
|
12 |
|
|
indvdum@0
|
13 |
# If you have domains with and without www prefix,
|
|
indvdum@0
|
14 |
# redirect one to the other.
|
|
indvdum@0
|
15 |
$HTTP["host"] =~ "^(myforums\.com)$" {
|
|
indvdum@0
|
16 |
url.redirect = (
|
|
indvdum@0
|
17 |
".*" => "http://www.%1$0"
|
|
indvdum@0
|
18 |
)
|
|
indvdum@0
|
19 |
}
|
|
indvdum@0
|
20 |
|
|
indvdum@0
|
21 |
$HTTP["host"] == "www.myforums.com" {
|
|
indvdum@0
|
22 |
server.name = "www.myforums.com"
|
|
indvdum@0
|
23 |
server.document-root = "/path/to/phpbb"
|
|
indvdum@0
|
24 |
server.dir-listing = "disable"
|
|
indvdum@0
|
25 |
|
|
indvdum@0
|
26 |
index-file.names = ( "index.php", "index.htm", "index.html" )
|
|
indvdum@0
|
27 |
accesslog.filename = "/var/log/lighttpd/access-www.myforums.com.log"
|
|
indvdum@0
|
28 |
|
|
indvdum@0
|
29 |
# Deny access to internal phpbb files.
|
|
indvdum@0
|
30 |
$HTTP["url"] =~ "^/(config\.php|common\.php|includes|cache|files|store|images/avatars/upload)" {
|
|
indvdum@0
|
31 |
url.access-deny = ( "" )
|
|
indvdum@0
|
32 |
}
|
|
indvdum@0
|
33 |
|
|
indvdum@0
|
34 |
# Deny access to version control system directories.
|
|
indvdum@0
|
35 |
$HTTP["url"] =~ "/\.svn|/\.git" {
|
|
indvdum@0
|
36 |
url.access-deny = ( "" )
|
|
indvdum@0
|
37 |
}
|
|
indvdum@0
|
38 |
|
|
indvdum@0
|
39 |
# Deny access to apache configuration files.
|
|
indvdum@0
|
40 |
$HTTP["url"] =~ "/\.htaccess|/\.htpasswd|/\.htgroups" {
|
|
indvdum@0
|
41 |
url.access-deny = ( "" )
|
|
indvdum@0
|
42 |
}
|
|
indvdum@0
|
43 |
|
|
indvdum@0
|
44 |
fastcgi.server = ( ".php" =>
|
|
indvdum@0
|
45 |
((
|
|
indvdum@0
|
46 |
"bin-path" => "/usr/bin/php-cgi",
|
|
indvdum@0
|
47 |
"socket" => "/tmp/php.socket",
|
|
indvdum@0
|
48 |
"max-procs" => 4,
|
|
indvdum@0
|
49 |
"idle-timeout" => 30,
|
|
indvdum@0
|
50 |
"bin-environment" => (
|
|
indvdum@0
|
51 |
"PHP_FCGI_CHILDREN" => "10",
|
|
indvdum@0
|
52 |
"PHP_FCGI_MAX_REQUESTS" => "10000"
|
|
indvdum@0
|
53 |
),
|
|
indvdum@0
|
54 |
"bin-copy-environment" => (
|
|
indvdum@0
|
55 |
"PATH", "SHELL", "USER"
|
|
indvdum@0
|
56 |
),
|
|
indvdum@0
|
57 |
"broken-scriptfilename" => "enable"
|
|
indvdum@0
|
58 |
))
|
|
indvdum@0
|
59 |
)
|
|
indvdum@0
|
60 |
}
|