{"id":368,"date":"2016-03-03T05:00:00","date_gmt":"2016-03-03T05:00:00","guid":{"rendered":"https:\/\/opstree.com\/blog\/\/2016\/03\/03\/setup-of-nginx-vhost\/"},"modified":"2025-11-21T16:27:09","modified_gmt":"2025-11-21T10:57:09","slug":"setup-of-nginx-vhost","status":"publish","type":"post","link":"https:\/\/opstree.com\/blog\/2016\/03\/03\/setup-of-nginx-vhost\/","title":{"rendered":"Setup of Nginx Vhost"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left;\">\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: center;\"><img loading=\"lazy\" decoding=\"async\" style=\"-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);\" src=\"https:\/\/lh4.googleusercontent.com\/sMsn9mbZ1BoSMNbom5Z32Uiv7CmFF72hqhCDmgcNIAuUVJ4dHCQsTneJgzWOkw0KT2nSgqQndvAul1jGpRP1_uvSubX0hmbca_I-GWun52LALVyT-ts2JKHGkGu58EqzAziKVFFg\" width=\"382\" height=\"380\" \/><\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<h2 style=\"line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt; text-align: justify;\">Introduction<\/h2>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: justify;\">This is an ancient way of setting up Vhost with nginx. As \u00a0we have Chef to automate everything. But before a kickoff with automation using chef, it\u2019s crucial to interpret our problem statement by dealing with it manually.<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: center;\">\u201cChoose Older Eggs For Hard Cooking Maria Simmons\u201d<\/div>\n<h2 style=\"line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt; text-align: justify;\">Problem Statement<\/h2>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: justify;\">NGINX is a free, open-source, high-performance HTTP server. Install nginx manually using package manager, and configure virtual host for opstree.com\/blog\/, chef.opstree.com.<\/div>\n<h2 style=\"line-height: 1.656; margin-bottom: 6pt; margin-top: 18pt; text-align: justify;\">Prerequisites<\/h2>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: justify;\">This exercise considers that you have a basic understanding of Git, and Vagrant. This blog deal with centos7.<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<h2 style=\"line-height: 1.656; margin-bottom: 6pt; margin-top: 18pt; text-align: justify;\">Install Nginx<\/h2>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: justify;\">Clone our github repository and spin up a bare centos7 vagrant machine.<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: justify;\">$ git clone git@github.com:OpsTree\/Chef.git<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: justify; text-indent: 36pt;\">Go to nginxVhost directory.<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: justify; text-indent: 36pt;\">$ cd \u00a0Chef\/centos\/nginxVhost<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<ul style=\"margin-bottom: 0; margin-top: 0;\">\n<li style=\"background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666667px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline;\">\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: justify;\">This directory have a Vagrantfile. Which can initiate a centos7 vagrant box with 512mb ram.<\/div>\n<\/li>\n<\/ul>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: justify; text-indent: 36pt;\">$ cat Vagrantfile<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: justify; text-indent: 36pt;\"><img loading=\"lazy\" decoding=\"async\" style=\"-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);\" src=\"https:\/\/lh3.googleusercontent.com\/XJYCJe2rpvulbkyzWl4goQVmjrSFvw0WWSyXI2_fIw47HYZaZ2Bxg_31DCu7_iFErquDhsMJ40UDAvfcqZliTjhzeXzzwq52nHC5Z41xJFWhz9wZABFd9kQvbChhu8lS0dWceLLG\" width=\"439\" height=\"72\" \/><\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 72pt; margin-top: 0; text-align: justify;\">This file update and install some basic tools in your vagrant machine using vagrant shell provisioning.<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<ul style=\"margin-bottom: 0; margin-top: 0;\">\n<li style=\"background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666667px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline;\">\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: justify;\">Launch new vagrant machine and login into it via ssh.<\/div>\n<\/li>\n<\/ul>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: justify;\"><\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: justify; text-indent: 36pt;\">$ vagrant up<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: justify; text-indent: 36pt;\">$ vagrant ssh<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<ul style=\"margin-bottom: 0; margin-top: 0;\">\n<li style=\"background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666667px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline;\">\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: justify;\">Add nginx repo<\/div>\n<\/li>\n<\/ul>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: justify;\">As nginx is not available in default list of centos7, we add nginx repo to it.<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 72pt; margin-top: 0; text-align: justify;\">$ sudo yum install -y epel-release<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<ul style=\"margin-bottom: 0; margin-top: 0;\">\n<li style=\"background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666667px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline;\">\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: justify;\">Install nginx<\/div>\n<\/li>\n<\/ul>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: justify;\">Install nginx using package manager \u201cyum\u201d.<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: justify; text-indent: 36pt;\">$ sudo yum install -y nginx<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<ul style=\"margin-bottom: 0; margin-top: 0;\">\n<li style=\"background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666667px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline;\">\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: justify;\">Start nginx<\/div>\n<\/li>\n<\/ul>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: justify;\">Nginx do not start on its own. Type following to start it.<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: justify; text-indent: 36pt;\">$ sudo service nginx start<\/div>\n<h2 style=\"line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt; text-align: justify;\">Setup Vhost<\/h2>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: justify;\">Let\u2019s go ahead with our problem statement of setting up vhost with nginx. This leads some dull steps to serve our webpages with opstree.com\/blog\/ and chef.opstree.com.<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<ul style=\"margin-bottom: 0; margin-top: 0;\">\n<li style=\"background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666667px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline;\">\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: justify;\">Replace nginx.conf file with given nginx.conf file.<\/div>\n<\/li>\n<\/ul>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: justify; text-indent: 36pt;\">$ sudo cp \/vagrant\/nginx.conf \/etc\/nginx\/nginx.conf<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<ul style=\"margin-bottom: 0; margin-top: 0;\">\n<li style=\"background-color: transparent; color: black; font-family: Arial; font-size: 12px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline;\">\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: justify;\">Copy opstree.com\/blog\/ and chef.opstree.com into the \/etc\/nginx\/conf.d directory<\/div>\n<\/li>\n<\/ul>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: justify;\"><\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-indent: 36pt;\">$ sudo cp \/vagrant\/opstree.com\/blog\/ \/etc\/nginx\/conf.d\/opstree.com\/blog\/<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-indent: 36pt;\">$ sudo cp \/vagrant\/chef.opstree.com \/etc\/nginx\/conf.d\/chef.opstree.com<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<ul style=\"margin-bottom: 0; margin-top: 0;\">\n<li style=\"background-color: transparent; color: black; font-family: Arial; font-size: 12px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline;\">\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: justify;\">Create home directory for vhost.<\/div>\n<\/li>\n<\/ul>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: justify;\"><\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: justify; text-indent: 36pt;\">$ sudo mkdir \/usr\/share\/nginx\/blog<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: justify;\"><\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: justify; text-indent: 36pt;\">$ sudo mkdir \/usr\/share\/nginx\/chef<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<ul style=\"margin-bottom: 0; margin-top: 0;\">\n<li style=\"background-color: transparent; color: black; font-family: Arial; font-size: 12px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline;\">\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: justify;\">Create index files.<\/div>\n<\/li>\n<\/ul>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: justify;\"><\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0;\">$ sudo su -c &#8220;echo \\&#8221;Welcome, this is opstree.com\/blog\/\\&#8221; &gt; \/usr\/share\/nginx\/blog\/index.html&#8221;<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: justify;\"><\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-indent: 36pt;\">$ sudo su -c &#8220;echo \\&#8221;Welcome, this is chef.opstree.com\\&#8221; &gt; \/usr\/share\/nginx\/chef\/index.html&#8221;<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<ul style=\"margin-bottom: 0; margin-top: 0;\">\n<li style=\"background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666667px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline;\">\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: justify;\">Make entry in \/etc\/hosts<\/div>\n<\/li>\n<\/ul>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: justify;\"><\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: justify; text-indent: 36pt;\">$ sudo vim \/etc\/hosts<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: justify; text-indent: 36pt;\">127.0.0.1 opstree.com\/blog\/<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: justify; text-indent: 36pt;\">127.0.0.1 chef.opstree.com<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<ul style=\"margin-bottom: 0; margin-top: 0;\">\n<li style=\"background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666667px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline;\">\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: justify;\">Restart nginx server<\/div>\n<\/li>\n<\/ul>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 72pt; margin-top: 0; text-align: justify;\">$ sudo service nginx restart<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<ul style=\"margin-bottom: 0; margin-top: 0;\">\n<li style=\"background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666667px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline;\">\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: justify;\">Access and test your \u00a0Vhost<\/div>\n<\/li>\n<\/ul>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: justify; text-indent: 36pt;\">$ curl opstree.com\/blog\/<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: justify; text-indent: 36pt;\">$ curl \u00a0chef.opstree.com<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: justify;\">You have done all the tiring stuff to set up Nginx Vhost.\u00a0 <img loading=\"lazy\" decoding=\"async\" style=\"border: none; transform: rotate(0rad);\" src=\"https:\/\/lh5.googleusercontent.com\/cjAEs_mM8qZ2tMYHxVFrfME4iMu9fy3_hV85QfHhFpU3BRWe_rc-9cvMtdLi4ItynwW8MbhIv6Mq-BG1FBuy_qis8sThD0rtU28F3pb6Y1ixd_Kmimkik5c-lLbsCOjWFwJsZzZG\" width=\"42\" height=\"38\" \/><\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: center;\">\u201cDon\u2019t let a bad day make you feel like you have a bad life.\u201d<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0;\">We understand your hard labor, so in next blog we go ahead to automate all the stuff.\u00a0 \u00a0<img loading=\"lazy\" decoding=\"async\" style=\"-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);\" src=\"https:\/\/lh5.googleusercontent.com\/BWrsD8eroinj8C1NoX_kPzo-V4p4Xc_poW_Wke6IXTAFJuYFEsXQkqdPJb2jRf-gqHOSdVzejGd2kXQZRSO-IbasFDjkO1ZeiPSJTtWsz3lu0HgaGerRr3lu9RoLVjWT-Jk8vmU3\" width=\"36\" height=\"36\" \/><\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\"><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 Introduction This is an ancient way of setting up Vhost with nginx. As \u00a0we have Chef to automate everything. But before a kickoff with automation using chef, it\u2019s crucial to interpret our problem statement by dealing with it manually. \u00a0 \u201cChoose Older Eggs For Hard Cooking Maria Simmons\u201d Problem Statement NGINX is a free, &hellip; <a href=\"https:\/\/opstree.com\/blog\/2016\/03\/03\/setup-of-nginx-vhost\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Setup of Nginx Vhost&#8221;<\/span><\/a><\/p>\n","protected":false},"author":150552946,"featured_media":29900,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[1],"tags":[768739297,768739308,676319247,768739301],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/11\/DevSecOps-1.jpg","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pfDBOm-5W","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/368"}],"collection":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/users\/150552946"}],"replies":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/comments?post=368"}],"version-history":[{"count":5,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/368\/revisions"}],"predecessor-version":[{"id":30007,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/368\/revisions\/30007"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/media\/29900"}],"wp:attachment":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/media?parent=368"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/categories?post=368"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/tags?post=368"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}