Open swanwish opened 5 years ago
The default setting on nginx log format doesn't have domain name, add the $host on the log format, it will output the domain name on the log file, the setting on /etc/nginx/nginx.conf file is like below:
/etc/nginx/nginx.conf
log_format main '$remote_addr - $remote_user [$time_local] "$host" "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"';
The default setting on nginx log format doesn't have domain name, add the $host on the log format, it will output the domain name on the log file, the setting on
/etc/nginx/nginx.conf
file is like below: