1. Create a new directory for the domain

mkdir /usr/share/nginx/linux.com/

2. Create a new configuration file for the domain

vim /etc/nginx/conf.d/linux.com.conf

3. Add in the following contents

## Virtual Host - linux.com
server {
    listen       80;
    server_name  linux.com www.linux.com;
    root /usr/share/nginx/linux.com/;
    index index.html index.htm index.php;
}

4. Reload Nginx to apply the changes

service nginx reload
			

Leave a Reply

Your email address will not be published. Required fields are marked *