아쉬운대로 빈스톡에서 제공하는 Server Customize 기능을 사용해서 nginx.conf
를 overwrite 했다.
# .ebextensions/01_nginx_config_customize.config
files:
/etc/nginx/nginx.conf:
owner: root
group: root
content: |
# ... another nginx settings
http {
log_format main '{"createdTs":"$time_iso8601", '
'"clientIp":"$remote_addr", '
'"upstreamAddr":"$upstream_addr", '
'"hostName":"$host", '
'"path":"$uri", '
'"query":"$args", '
'"httpProtocol":"$server_protocol", '
'"httpMethod":"$request_method", '
'"statusCode":"$status", '
'"pageReferrer":"$http_referer", '
'"userAgent":"$http_user_agent", '
'"http_x_forwarded_for":"$http_x_forwarded_for", '
'"body_bytes_sent":"$body_bytes_sent", '
'"upstream_response_time":"$upstream_response_time", '
'"upstream_connect_time":"$upstream_connect_time", '
'"upstream_status":"$upstream_status"}';
access_log /var/log/nginx/access.log main;
# ... another nginx.http settings
}
# ... another nginx settings