Can only one site be configured in a LNMP environment built by virtual machines?

build a site locally using virtual machines.
in the nginx configuration file, accompany the domain name a.com. The specified root directory can be accessed normally in my local access domain name at / var/www/a
.
but I have configured a site b.com, and the specified root directory cannot be accessed when accessing b.com locally in / home/hjy/www/b (this directory user and user group are both hjy)
. What"s going on here? I have the highest authority.

May.26,2021

two configurations should be posted.


NGINX.conf configuration, you can add vhost

Menu