Challenge 1
Define a named access-log schema.
main '$remote_addr [$time_local] "$request" $status $upstream_response_time';
Press Ctrl⌘Enter to check your answer
Fill in log formats, JSON escaping, and stub_status.
Challenge 1
main '$remote_addr [$time_local] "$request" $status $upstream_response_time';
Press Ctrl⌘Enter to check your answer
Challenge 2
log_format =json combined_json '{"ts":"$time_iso8601","uri":"$uri","status":$status}';
Press Ctrl⌘Enter to check your answer
Challenge 3
server {
location = /status {
allow 127.0.0.1;
deny all;
;
}
}
Press Ctrl⌘Enter to check your answer
Challenge 4
log_format cache '$uri $status $upstream_addr';
Press Ctrl⌘Enter to check your answer
Challenge 5
server {
/var/log/nginx/app.error.log notice;
}
Press Ctrl⌘Enter to check your answer