-
Notifications
You must be signed in to change notification settings - Fork 509
/
lighttpd_fcgi.conf
executable file
·80 lines (67 loc) · 2.37 KB
/
lighttpd_fcgi.conf
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
72
73
74
75
76
77
78
79
80
# -*- Mode: Conf; tab-width: 4; indent-tabs-mode: nil; -*-
# vim:set ft=conf ts=4 sw=4 sts=4 autoindent:
# Example configuration for hosting brat using LigHTTPD and FastCGI.
#
# Author: Pontus Stenetorp <pontus stenetorp se>
# Version: 2011-08-21
# Import the FastCGI module (Don't touch this!)
server.modules += ( "mod_fastcgi" )
### Mandatory parameters
server.document-root = CHANGE_ME
### Might-be-interesting parameters
#server.username = "www-data"
#server.groupname = "www-data"
server.port = 4711
# We put the log by default into the brat work directory
server.errorlog = server.document-root + "/work/lighttpd_fcgi_error.log"
server.pid-file = server.document-root + "/work/lighttpd_fcgi.pid"
fastcgi.debug = 0
### Most-likely-not-interesting parameters
index-file.names = ( "index.html" )
# NOTE: Keep this filled not to serve non-sense
static-file.exclude-extensions = ( ".fcgi", "~", ".cgi", ".py", ".pyc",
".htaccess", ".gitignore" )
# Re-write URL;s directed at the CGI script to FastCGI
server.modules += ( "mod_rewrite" )
url.rewrite-once = (
"^/ajax.cgi" => "/ajax.fcgi",
)
# Configure FastCGI
fastcgi.server = ( "/ajax.fcgi" =>
((
"bin-path" => server.document-root + "/ajax.fcgi",
"socket" => server.document-root + "/work/lighttpd_fastcgi.socket",
# Only allow a single process to serve requests for now
"max-procs" => 16,
# Don't check in the local filesystem for a file with the same name as
# the script
"check-local" => "disable"
))
)
# Mime type mappings
mimetype.assign = (
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".png" => "image/png",
".gif" => "image/gif",
".pdf" => "application/pdf",
".svg" => "image/svg+xml",
".xhtml" => "application/xhtml+xml",
".html" => "text/html",
".htm" => "text/html",
".xml" => "text/xml",
".txt" => "text/plain",
".js" => "text/javascript",
".css" => "text/css",
".ttf" => "font/ttf",
".zip" => "application/zip",
".tar" => "application/x-tar",
".gz" => "application/x-gzip",
".tar.gz" => "application/x-tgz",
".tgz" => "application/x-tgz",
".bz2" => "application/x-bzip",
".tbz" => "application/x-bzip-compressed-tar",
".tar.bz2"=> "application/x-bzip-compressed-tar",
# make the default mime type application/octet-stream
"" => "application/octet-stream",
)