yum install epel-release -y
yum install nginx -y
systemctl start nginx
Find your IP :
ip addr show eth0 | grep inet | awk '{ print $2; }' | sed 's/\/.*$//'
Add virtual host
cd /etc/nginx/conf.d/
vi arun.in.conf
==============================
server {
listen 80;
# listen *:80;
server_name arun.in;
location / {
root /home/arun/public_html/;
index index.html index.htm;
}
}
==============================
vi anu.in.conf
==============================
server {
listen 80;
# listen *:80;
server_name anu.in;
location / {
root /home/anu/public_html/;
index index.html index.htm;
}
}
==============================
systemctl restart nginx