-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path60-uniliquid.conf
executable file
·38 lines (29 loc) · 1.52 KB
/
60-uniliquid.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
server.modules += ( "mod_cgi", "mod_rewrite", "mod_setenv")
# Enable CGI-Execution of *.lua files through lua binary
cgi.assign += ( ".lua" => "/usr/bin/lua5.1" )
# Configure environment for demo application
$HTTP["url"] =~ "^/" {
alias.url = ( "/static" => "/opt/uniliquid_frontend/static",
"" => "/opt/webmcp/cgi-bin" )
setenv.add-environment += (
"LANG" => "en_US.UTF-8",
"WEBMCP_APP_BASEPATH" => "/opt/uniliquid_frontend/",
"WEBMCP_CONFIG_NAME" => "myconfig")
}
# URL beautification
url.rewrite-once += (
# do not rewrite static URLs
"^/static/(.*)$" => "/static/$1",
"^/favicon.ico$" => "/static/favicon.ico",
"^/(r|f|s|t|i|ri)\?(.*)$" => "/static/$1.php?$2",
# base URL
"^/(\?(.*))?$" => "/webmcp-wrapper.lua?_webmcp_urldepth=0&_webmcp_module=index&_webmcp_view=index&$2",
# module base URLs
"^/([^/\?]+)/(\?(.*))?$" => "/webmcp-wrapper.lua?_webmcp_urldepth=1&_webmcp_module=$1&_webmcp_view=index&$3",
# actions
"^/([^/\?]+)/([^/\.\?]+)(\?(.*))?$" => "/webmcp-wrapper.lua?_webmcp_urldepth=1&_webmcp_module=$1&_webmcp_action=$2&$4",
# views without numeric id or string ident
"^/([^/\?]+)/([^/\?]+)\.([^/\.\?]+)(\?(.*))?$" => "/webmcp-wrapper.lua?_webmcp_urldepth=1&_webmcp_module=$1&_webmcp_view=$2&_webmcp_suffix=$3&$5",
# views with numeric id or string ident
"^/([^/\?]+)/([^/\?]+)/([^/\?]+)\.([^/\.\?]+)(\?(.*))?$" => "/webmcp-wrapper.lua?_webmcp_urldepth=2&_webmcp_module=$1&_webmcp_view=$2&_webmcp_id=$3&_webmcp_suffix=$4&$6",
)