How does nginx, know which domain name or ip? is used to access the local machine for each visit request?

for example, this request is accessed directly through ip? Or is it accessed through a domain name?

Mar.20,2021

there are several ways to do this. You can log different visits to different log files and distinguish ip and domain name access from virtual hosts.

in addition, you can customize the contents of the log file, record the $http_host , and use the log_format configuration instruction to customize the log format

.

log_format host
this is the host requested by the user


judge

by the Host attribute in request headers

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3c21f-2c2e1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3c21f-2c2e1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?