CentOS 7
Sponsored Link

Nginx : Virtual Hostings
This is the Virtual Hostings setting for Nginx.
For example, configure additional domainame "virtual.host".
[1] Configure Nginx.
[[email protected] ~]#
vi /etc/nginx/conf.d/virtual.host.conf
# create new

server {
    listen       80;
    server_name  www.virtual.host;

    location / {
        root   /usr/share/nginx/virtual.host;
        index  index.html index.htm;

[[email protected] ~]#
mkdir /usr/share/nginx/virtual.host

[[email protected] ~]#
systemctl restart nginx

[2] Create a test page to make sure it works normally.
[[email protected] ~]#
vi /usr/share/nginx/virtual.host/index.html
<div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;">
Nginx Virtual Host Test Page