-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.lighttpd.conf
55 lines (51 loc) · 1.95 KB
/
template.lighttpd.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
server.document-root = "/"
#server.username = "www" # need to create user and group in Dockerfile
#server.groupname = "www"
static-file.exclude-extensions = ( ".fcgi", ".php", ".rb", "~", ".inc" )
index-file.names = ( "index.html" )
server.bind = "0.0.0.0"
server.port = 8000
server.modules = ( "mod_auth", "mod_proxy", "mod_accesslog" )
# While running lighttpd earlier than lighttpd 1.4.71
mimetype.assign = (
".css" => "text/css",
".jpg" => "image/jpeg",
".jpeg"=> "image/jpeg",
".png" => "image/png" ,
".svg" => "image/svg+xml",
".js" => "text/javascript"
)
debug.log-request-header ="enabled"
debug.log-request-header-on-error ="enabled"
# debug.log-response-header ="enabled"
debug.log-file-not-found ="enabled"
# debug.log-request-handling ="enabled"
# debug.log-condition-handling ="enabled"
# mode status
# server.modules += ( "mod_status" )
# status.status-url = "/server-status"
# status.config-url = "/server-config"
# status.statistics-url = "/server-statistics"
$HTTP["url"] =~ "^/static/" {
server.document-root = "{%APP_DIR%}"
} else $HTTP["url"] =~ "^/media/public/" {
server.document-root = "{%APP_DIR%}"
} else $HTTP["url"] =~ "^/.well-known/" {
# used by lets-encrypt: the /app/media directory is mounted on <cm dir>/media and accessible by certbot.
# Use your <cm_dir>/media dir as webroot in this certbot command: sudo certbot certonly --webroot
server.document-root = "{%APP_DIR%}/media"
} else $HTTP["url"] =~ "^/chat" { # websocket for the chat, add upgrade header
proxy.server = ("/" =>
( "cousinsmatter socket" => (
# sockets are created in APP_DIR for running as non root
"socket" => "{%APP_DIR%}/cousinsmatter.socket"
))
)
proxy.header = ( "upgrade" => "enable" )
} else $HTTP["url"] =~ "" {
proxy.server = ("/" =>
( "cousinsmatter socket" => (
"socket" => "{%APP_DIR%}/cousinsmatter.socket"
))
)
}