How to Virtual Configure Hostings for Nginx
#NGINX
#Virtual Host Confiure.....
Nginx : Virtual Hostings Confiure.....
Virtual Hostings Configure for Nginx.
For example, configure additional domainame [nginx.virtual.com].
Configure Nginx.
root@server:~# vi /etc/nginx/sites-available/nginx.virtual.com.conf
create new
server {
listen 80;
server_name www.nginx.virtual.com;
location / {
root /var/www/nginx.virtual.com.host;
index index.html index.htm;
}
}
root@server:~#mkdir /var/www/nginx.virtual.com
root@server:~# cd /etc/nginx/sites-enabled
root@server:/etc/nginx/sites-enabled# ln -s /etc/nginx/sites-available/nginx.virtual.com.conf ./
root@server:/etc/nginx/sites-enabled# systemctl restart nginx
Create a test page to make sure it works normally.
root@www:~# vi /var/www/nginx.virtual.com/index.html
Thank you....
If my video is helpful to you then, please please subscribe and like
Thank you for watching my video ,please like and subscribe