Open kakeru-one opened 1 week ago
log_format json escape=json '{"time":"$time_iso8601",'
'"host":"$remote_addr",'
'"port":"$remote_port",'
'"method":"$request_method",'
'"uri":"$request_uri",'
'"status":"$status",'
'"body_bytes":"$body_bytes_sent",'
'"referer":"$http_referer",'
'"ua":"$http_user_agent",'
'"request_time":"$request_time",'
'"response_time":"$upstream_response_time"}';
access_log /var/log/nginx/access.log json;
[mysqld]
character-set-server=utf8mb4
slow_query_log = 1
slow_query_log_file = /var/log/mysql/mysql-slow.log
long_query_time = 0
[mysql]
default-character-set=utf8mb4
[client]
default-character-set=utf8mb4
Nginx
記述確認
etc/nginx/nginx.conf
MySQL
etc/mysql/mysql.conf.d/mysql.cnf