mod_static serves static files.
conf/mod_static/mod_static.conf
Config Item | Description |
---|---|
Basic.DataPath | String path of rule configuraiton |
[basic]
DataPath = mod_static/static_rule.data
conf/mod_static/static_rule.data
Config Item | Description |
---|---|
Version | String Verson of config file |
Config | Struct Static rules for each product |
Config{k} | String Product name |
Config{v} | Object A ordered list of static rules |
Config{v}[] | Object A static rule |
Config{v}[].Cond | String Condition expression, See Condition |
Config{v}[].Action | Object A static action |
Config{v}[].Action.Cmd | String Name of static action |
Config{v}[].Action.Params | Object Parameters of static action |
Action | Description |
---|---|
BROWSE | Serve static files. The first parameter is the location of root directory. The second parameter is the name of default file. |
{
"Config": {
"example_product": [
{
"Cond": "req_host_in(\"www.example.org\")",
"Action": {
"Cmd": "BROWSE",
"Params": [
"./",
"index.html"
]
}
}
]
},
"Version": "20190101000000"
}