|
@@ -0,0 +1,89 @@
|
|
|
+# common config
|
|
|
+common:
|
|
|
+ # 'true' for enable global debug mode, 'false' for production environment
|
|
|
+ debug: true
|
|
|
+ # 'true' for redirect to 'redirect_url' when file not found, 'false' to return 404 message.
|
|
|
+ redirect_when_404: true
|
|
|
+ # when 'redirect_when_404' is 'true', it will redirect to this url when file not found.
|
|
|
+ redirect_url: "/"
|
|
|
+ # 'true' for enable backend reverse proxy, 'false' for disable.
|
|
|
+ backend_proxy_enable: true
|
|
|
+ # 'true' for enable gzip compression
|
|
|
+ enable_gzip: true
|
|
|
+ # 'true' for enable vue history mode support
|
|
|
+ vue_history_mode: true
|
|
|
+# config for log
|
|
|
+log:
|
|
|
+ # 'true' for enable access log, 'false' for disable access log
|
|
|
+ access_log_enable: true
|
|
|
+ # config for log rolling
|
|
|
+ rolling_log_config:
|
|
|
+ # config for error log rolling
|
|
|
+ error_log:
|
|
|
+ # absolute path to log (log rotating will append infix into filename)
|
|
|
+ file: "/data/logs/frontend.err.log"
|
|
|
+ # max size per log file (MegaBytes)
|
|
|
+ max_size: 16
|
|
|
+ # max days for rotating
|
|
|
+ max_age: 30
|
|
|
+ # max backups for rotating remain
|
|
|
+ max_backups: 50
|
|
|
+ # 'true' for using local time for rotating
|
|
|
+ use_local_time: true
|
|
|
+ # 'true' for compress rotating history into zip files
|
|
|
+ compress_history: true
|
|
|
+ # config for access log rolling
|
|
|
+ access_log:
|
|
|
+ # absolute path to log (log rotating will append infix into filename)
|
|
|
+ file: "/data/logs/frontend.access.log"
|
|
|
+ # max size per log file (MegaBytes)
|
|
|
+ max_size: 16
|
|
|
+ # max days for rotating
|
|
|
+ max_age: 30
|
|
|
+ # max backups for rotating remain
|
|
|
+ max_backups: 50
|
|
|
+ # 'true' for using local time for rotating
|
|
|
+ use_local_time: true
|
|
|
+ # 'true' for compress rotating history into zip files
|
|
|
+ compress_history: true
|
|
|
+ # detail config for access log
|
|
|
+ error_log_config:
|
|
|
+ # the log emitting level, the message which level below this will be emitted
|
|
|
+ # optional value: 'DEBUG', 'INFO', 'WARN', 'ERROR', 'PANIC', 'FATAL'
|
|
|
+ # all level option below should be one of these values
|
|
|
+ output_level: "INFO"
|
|
|
+ # format string for log. this formation using YAGTF.
|
|
|
+ # Reference: http://git.swzry.com/zry/YAGTF
|
|
|
+ # Expanded Tags: <level>, <unit>, <msg>
|
|
|
+ # Example: "![<y>-<mon>-<d> <h24>:<min>:<s>.<us> <tz> <tzA>] <lt><level><gt> {<unit>} <msg><br>"
|
|
|
+ log_format: "![<y>-<mon>-<d> <h24>:<min>:<s>.<us> <tz> <tzA>] <lt><level><gt> {<unit>} <msg><br>"
|
|
|
+ # 'true' for use UTC time in log, 'false' for use local timezone.
|
|
|
+ use_utc: false
|
|
|
+ # detail config for access log
|
|
|
+ access_log_config:
|
|
|
+ # the log emitting level, the message which level below this will be emitted
|
|
|
+ # optional value: 'DEBUG', 'INFO', 'WARN', 'ERROR', 'PANIC', 'FATAL'
|
|
|
+ # all level option below should be one of these values
|
|
|
+ output_level: "INFO"
|
|
|
+ # level for HTTP 200
|
|
|
+ success_level: "INFO"
|
|
|
+ # level for HTTP 404
|
|
|
+ not_found_level: "WARN"
|
|
|
+ # level for HTTP 403
|
|
|
+ forbidden_level: "WARN"
|
|
|
+ # level for HTTP 502/503
|
|
|
+ gateway_error_level: "ERROR"
|
|
|
+ # level for HTTP 500
|
|
|
+ internal_error_level: "ERROR"
|
|
|
+ # level for Other HTTP Status Code
|
|
|
+ other_status_level: "INFO"
|
|
|
+ # format string for log. this formation using YAGTF.
|
|
|
+ # Reference: http://git.swzry.com/zry/YAGTF
|
|
|
+ # Expanded Tags: <level>, <url>, <status>
|
|
|
+ # Example: "!{<q>time<q>: <q><y>-<mon>-<d> <h24>:<min>:<s>.<us> <tz> <tzA><q>, <q>level<q>: <q><level><q>, <q>method<q>: <q><method><q>, <q>status<q>: <status>, <q>client_ip<q>: <q><cip><q>, <q>url<q>: <q><url><q>}<br>"
|
|
|
+ # Output example for this example: {"time": "2019-09-19 11:45:14.191981000 +0800 CST", "level": "INFO", "method": "GET", "status": 200, "client_ip": "127.0.0.1", "url": "/"}
|
|
|
+ log_format: "!{<q>time<q>: <q><y>-<mon>-<d> <h24>:<min>:<s>.<us> <tz> <tzA><q>, <q>level<q>: <q><level><q>, <q>method<q>: <q><method><q>, <q>status<q>: <status>, <q>client_ip<q>: <q><cip><q>, <q>url<q>: <q><url><q>}<br>"
|
|
|
+ # 'true' for use UTC time in log, 'false' for use local timezone.
|
|
|
+ use_utc: false
|
|
|
+
|
|
|
+
|