mod_compress compresses responses using specified method.
conf/mod_compress/mod_compress.conf
Config Item | Description |
---|---|
Basic.DataPath | String Path of rule configuration |
Log.OpenDebug | Boolean Whether enable debug logs Default False |
[basic]
DataPath = mod_compress/compress_rule.data
[log]
OpenDebug = false
Config Item | Description |
---|---|
Version | String Vesion of config file |
Config | Object Compress rule for each product |
Config{k} | String Product name |
Config{v} | Object A list of compress rules |
Config{v}[] | Object A compress rule |
Config{v}[].Cond | String Condition expression, See Condition |
Config{v}[].Action | Object Action |
Config{v}[].Action.Cmd | String Name of Action |
Config{v}[].Action.Quality | Integer Compression level |
Config{v}[].Action.FlushSize | Integer Flush size |
Action | Descrition |
---|---|
GZIP | Compress response using gzip method |
BROTLI | Compress response using brotli method |
{
"Config": {
"example_product": [
{
"Cond": "req_host_in(\"www.example.org\")",
"Action": {
"Cmd": "GZIP",
"Quality": 9,
"FlushSize": 512
}
}
]
},
"Version": "20190101000000"
}