1
|
server.modules = ("mod_fastcgi", "mod_setenv", "mod_proxy", "mod_wstunnel", "mod_openssl")
|
2
|
server.upload-dirs = ( "/usr/local/lmedia/lost+found", "/tmp" )
|
3
|
|
4
|
include "mod_websocket.conf"
|
5
|
|
6
|
server.document-root = "/usr/local/www"
|
7
|
server.pid-file = "/var/run/lighttpd.pid"
|
8
|
|
9
|
# files to check for if .../ is requested
|
10
|
index-file.names = ( "home.html","index.php", "index.html",
|
11
|
"index.htm", "default.htm", "index.html.gz","viewer.html")
|
12
|
|
13
|
server.error-handler-404 = "/index.html"
|
14
|
|
15
|
debug.log-request-handling = "disable"
|
16
|
debug.log-state-handling = "disable"
|
17
|
debug.log-request-header="enable"
|
18
|
debug.log-response-header="enable"
|
19
|
|
20
|
server.max-read-idle = 120
|
21
|
server.max-keep-alive-idle = 120
|
22
|
fastcgi.debug = 1
|
23
|
|
24
|
fastcgi.server += ("/api" =>
|
25
|
((
|
26
|
"bin-path" => "/usr/local/bin/spx_restservice",
|
27
|
"max-procs" => 1,
|
28
|
"socket" => "/tmp/spx_restservice.socket",
|
29
|
"check-local" => "disable",
|
30
|
"allow-x-send-file" => "enable"
|
31
|
)))
|
32
|
|
33
|
#include_shell "[ -f /conf/lighttpd_ext.conf ] && cat /conf/lighttpd_ext.conf || echo -n "
|
34
|
include "lighttpd_ext.conf"
|
35
|
|
36
|
#use always https feature based support
|
37
|
include "mod_always_https.conf"
|
38
|
# mimetype mapping
|
39
|
mimetype.assign = (
|
40
|
".gif" => "image/gif",
|
41
|
".jpg" => "image/jpeg",
|
42
|
".jpeg" => "image/jpeg",
|
43
|
".png" => "image/png",
|
44
|
".css" => "text/css",
|
45
|
".html" => "text/html",
|
46
|
".htm" => "text/html",
|
47
|
".js" => "text/javascript",
|
48
|
".text" => "text/plain",
|
49
|
".txt" => "text/plain",
|
50
|
".xml" => "text/xml",
|
51
|
".elg" => "application/x-ibmclog",
|
52
|
".jnlp" => "application/x-java-jnlp-file",
|
53
|
".gz" => "application/x-gzip",
|
54
|
".tar.gz" => "application/x-gzip-compressed-tar"
|
55
|
)
|
56
|
|
57
|
#enable ipv6 support
|
58
|
server.use-ipv6 = "enable"
|
59
|
server.socket = "[::]:80"
|
60
|
|
61
|
## bind to port (default: 80)
|
62
|
server.port = 80
|
63
|
|
64
|
## SSL Engine
|
65
|
$SERVER["socket"] == ":443" {
|
66
|
ssl.engine = "enable"
|
67
|
server.use-ipv6 = "enable"
|
68
|
ssl.cipher-list = "TLSv1+HIGH !SSLv2 !RC4 !aNULL !eNULL !3DES @STRENGTH"
|
69
|
}
|
70
|
|
71
|
$HTTP["url"] =~ "\.js$|\.html$|\.css$|\.png$|\.woff$|\.jpg$|^/$" {
|
72
|
setenv.add-response-header += ( "Content-Encoding" => "gzip","X-Frame-Options" => "SAMEORIGIN")
|
73
|
}
|
74
|
##set cache control to no only for url with /api/
|
75
|
$HTTP["url"] =~ "^/api" {
|
76
|
setenv.add-response-header += ( "Cache-Control" => "no-store, no-cache, must-revalidate, post-check=0, pre-check=0" )
|
77
|
}
|
78
|
|
79
|
include "redfish_lighttpd.conf"
|