以基于域名为例
[root@localhost ~]#vim /apps/nginx/conf/nginx.conf
[root@localhost ~]#vim /apps/nginx/conf.d/test.conf
[root@localhost html]#echo 123 > ./123/index.html
[root@localhost html]#echo abc > ./abc/index.html
[root@localhost html]#cat 123/index.html
123
[root@localhost html]#cat abc/index.html
abc
[root@localhost html]#nginx -t
nginx: the configuration file /apps/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /apps/nginx/conf/nginx.conf test is successful
[root@localhost html]#nginx -s reload