-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlighttpd.conf.php
executable file
·71 lines (55 loc) · 1.9 KB
/
lighttpd.conf.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
// Dynamically divide number of desired parallel PHP processes
// into parent and child processes
$procs = isset($argv[1]) && (int)$argv[1]>=1 ? (int)$argv[1] : 2;
$parentProcs = min(4, ($procs % 3 == 0) ? $procs/3 : ceil($procs/2));
$childProcs = ceil($procs/$parentProcs);
?>
## lighttpd configuration file
## Modules to load
server.modules = ("mod_rewrite", "mod_fastcgi", "mod_accesslog")
## where to send error-messages to
server.errorlog = "/var/log/lighttpd/error.log"
## send a different Server: header
## be nice and keep it at lighttpd
server.tag = "lighttpd"
#### accesslog module
accesslog.filename = "/var/log/lighttpd/access.log"
## to help the rc.scripts
server.pid-file = "/var/run/lighttpd.pid"
# change uid to <uid> (default: don't care)
server.username = "lighttpd"
# change uid to <uid> (default: don't care)
server.groupname = "lighttpd"
## FastCGI Configuration
fastcgi.server = ( ".php" => (
"localhost" => (
"socket" => "/var/run/lighttpd/php-fastcgi.socket",
"bin-path" => "/usr/bin/php-cgi",
"max_procs" => <?php echo $parentProcs; ?>,
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "<?php echo $childProcs; ?>",
"PHP_FCGI_MAX_REQUESTS" => "500"
)
)
)
)
# MIME Types for static files
mimetype.assign = (
".gif" => "image/gif",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".png" => "image/png",
".css" => "text/css",
".js" => "text/javascript",
".svg" => "image/svg+xml",
".pdf" => "application/pdf",
".htm" => "text/html",
".html" => "text/html"
)
# Solve problem with 417 errors
server.reject-expect-100-with-417 = "disable"
# URL Rewriting
url.rewrite-if-not-file = ( "^/(.*)" => "/index.php/$1" )
# Document Root
server.document-root = "/var/www/app/web/"