By default nginx's log_format does not contain hostname. Since I serve multiple domains with a single nginx, I want to add hostname to nginx's access logs.
I guess nginx's default log_format
is combined
which is something
like this:
[ | |
{ | |
"name": "Amsterdam Airport Schiphol", | |
"description": "Free wifi; network name: Airport_Free_WiFi (1 hour time limit) -- British Airways Lounge password: singapore -- Crown Lounge 52 network name: KLM-Lounge - password (only phones need password): (your name)#KLM\n\nHere's how to unlock airport wireless time limits: (https://foxnomad.com/2014/05/22/unlock-unlimited-wifi-airports-time-restrictions/)\n", | |
"long": 4.7682744, | |
"lat": 52.3105386 | |
}, | |
{ | |
"name": "Frankfurt Airport", | |
"description": "Free wireless extended throughout entire airport. Network name: Frankfurt Airport, Hotspot Telekom - Name and email required. (Password: Internet)", |