{"id":3780,"date":"2020-05-01T09:32:54","date_gmt":"2020-05-01T09:32:54","guid":{"rendered":"https:\/\/cloudminister.com\/?p=3780"},"modified":"2020-05-01T09:32:54","modified_gmt":"2020-05-01T09:32:54","slug":"how-to-set-up-apache-virtual-hosts-in-centos-7","status":"publish","type":"post","link":"https:\/\/cloudminister.com\/blog\/how-to-set-up-apache-virtual-hosts-in-centos-7\/","title":{"rendered":"How to set up Apache virtual hosts in CentOS 7 ?"},"content":{"rendered":"<p><b style=\"font-size: 16px;\">What is Virtual Hosts\/hosting?<\/b><\/p>\n<p><span style=\"font-weight: 400;\"><em>Virtual hosting<\/em>\u00a0is a method for\u00a0<em>hosting<\/em>\u00a0multiple domain names (with separate handling of each name) on a single server (or pool of servers). This allows one server to share its resources, such as memory and processor cycles, without requiring all services provided to use the same <i>hostname<\/i>.<\/span><\/p>\n<h2><b>Prerequisite is:<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">You need to access the <a href=\"https:\/\/cloudminister.com\/linux-vps-server\/\">CentOS 7 server<\/a> with either root or user access.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">You also need to install the apache web server, if you don&#8217;t have installed you can use the following commands :<\/span><\/p>\n<p>&nbsp;<\/p>\n<table style=\"height: 183px;\" width=\"297\">\n<tbody>\n<tr>\n<td>\n<h3><span style=\"font-weight: 400;\">Commands used when <\/span><\/h3>\n<h3><span style=\"font-weight: 400;\">we have root access otherwise<\/span><\/h3>\n<h3><span style=\"font-weight: 400;\">insert sudo behind each and every command\u00a0<\/span><\/h3>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ul>\n<li><b>yum -y update<\/b><\/li>\n<li><b>yum\u00a0 -y install httpd\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/b><\/li>\n<\/ul>\n<ul>\n<li><strong>systemctl start httpd<\/strong><\/li>\n<\/ul>\n<ul>\n<li><strong>systemctl enable httpd<\/strong><\/li>\n<\/ul>\n<ul>\n<li><strong>systemctl restart httpd<\/strong><\/li>\n<\/ul>\n<ul>\n<li><strong>systemctl status httpd<\/strong><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">After installation, you will see the active status when we set off the status command.<\/span><\/p>\n<h2><strong>After the proper installation of Apache all you have to follow the proper steps for shared hosting:<\/strong><\/h2>\n<h3><b>Step 1<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Buy multiple domain names from the domain provider and configure it with the DNS<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Here we have purchased the two domains<\/span><\/p>\n<p>For the learning purpose, we have bought from the free domain provider i.e freenom.com.<\/p>\n<p>you can either buy the domain from the domain provider.<\/p>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cloudminister.com\/blog\/wp-content\/uploads\/2020\/09\/dom1.png\" \/><\/p>\n<h3><b>Step 2<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">As this is for the testing purpose so there will be no added text, pictures in these domains.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">By default, there will be an <\/span><i><span style=\"font-weight: 400;\">index.html<\/span><\/i><span style=\"font-weight: 400;\"> file in <\/span><i><span style=\"font-weight: 400;\">\/var\/www\/html\/index.html\u00a0<\/span><\/i><\/p>\n<p><span style=\"font-weight: 400;\">The document root the top-level directory that will save the content of the website.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Here we will create the directory of each virtual host that we plan on making.<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cloudminister.com\/blog\/wp-content\/uploads\/2020\/09\/vh1.png\" \/><\/p>\n<h3><b>Step 3<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Here we will delete the default index.html file and after the deletion, we will create the index.html file in the same \/<em>html <\/em>directory.<\/span><\/p>\n<p>(for deleting the use <em>$rm -rf<\/em>\u00a0 <em>index.html<\/em> command) (to creating use touch command\u00a0 touch <em>index.html)<\/em><\/p>\n<p><span style=\"font-weight: 400;\">We have created two dir. name japan123 &amp; japan321 and also created two files index.html\u00a0\u00a0<\/span><\/p>\n<h3><strong>Step 4<\/strong><\/h3>\n<p>In the <em>index.html<\/em> file for both the domains( japan123.tk &amp; japan321.tk) just write the following lines &#8220;jack ryan from florida&#8221; &amp; &#8220;japan321&#8221;.<\/p>\n<p>using the editor command <em>$vim <\/em><span style=\"font-weight: 400;\"><em>var\/www\/html\/japan123\/index.html<\/em> &amp; <em>$vim <\/em><em>var\/www\/html\/japan321\/index.html<\/em><\/span><\/p>\n<h3><b>Step 5<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">After doing this we will enter into the Apache configuration file to create the virtual hosts<\/span><\/p>\n<p><span style=\"font-weight: 400;\">For doing this process<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cloudminister.com\/blog\/wp-content\/uploads\/2020\/09\/vh2.png\" \/><\/p>\n<p>Open your editor of choice and create the following basic Virtual Host configuration file:<\/p>\n<p><span style=\"font-weight: 400;\">&lt;VirtualHost *:80&gt;\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ||\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0&lt;VirtualHost *:80&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">DocumentRoot &#8220;\/var\/www\/html\/japan123&#8221;\u00a0 \u00a0 \u00a0 \u00a0 ||\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 DocumentRoot &#8220;\/var\/www\/html\/japan321&#8221;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">ServerName www.japan123.tk\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0||\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ServerName www.japan321.tk\u00a0 <\/span><\/p>\n<p><span style=\"font-weight: 400;\">ServerAlias jpan123.tk\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0||\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ServerAlias jpan321.tk\u00a0 \u00a0 \u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&lt;Directory \/var\/www\/html\/japan123&gt;\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0||\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;Directory \/var\/www\/html\/japan321&gt;\u00a0 \u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Require all granted\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0||\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0Require all granted\u00a0 \u00a0 <\/span><\/p>\n<p><span style=\"font-weight: 400;\">&lt;\/Directory&gt;\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0||\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0&lt;\/Directory&gt;\u00a0 \u00a0 \u00a0 \u00a0 <\/span><\/p>\n<p><span style=\"font-weight: 400;\">&lt;\/VirtualHost&gt;\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0||\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0&lt;\/VirtualHost&gt;\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Here we have made two virtual hosts to connect with the single server<\/span><\/p>\n<p><span style=\"font-weight: 400;\">So we have to insert the following commands shown in the above picture.<\/span><\/p>\n<h3><b>Step 6<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">After saving with the file we have to restart the httpd server<\/span><\/p>\n<p><i><span style=\"font-weight: 400;\"># systemctl restart httpd<\/span><\/i><\/p>\n<h3><b>Step 7<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">At last, we just put both the domain names japan123.tk &amp; japan321.tk in the web browser.<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cloudminister.com\/blog\/wp-content\/uploads\/2020\/09\/vh3.png\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cloudminister.com\/blog\/wp-content\/uploads\/2020\/09\/vh4.png\" \/><\/p>\n<pre><strong>Conclusion<\/strong>: After this you will able to host multiple domain on a single server.<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>What is Virtual Hosts\/hosting? Virtual hosting\u00a0is a method for\u00a0hosting\u00a0multiple domain names (with separate handling of each name) on a single server (or pool of servers). This allows one server to share its resources, such as memory and processor cycles, without requiring all services provided to use the same hostname. Prerequisite is: You need to access&#8230;<\/p>\n","protected":false},"author":1,"featured_media":4631,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"footnotes":""},"categories":[90,59,62,66],"tags":[184,185,186,187,188,189],"class_list":["post-3780","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-beginner","category-general","category-how-to","category-technology","tag-apache-virtual-host","tag-apache-virtual-hosts-in-centos-7","tag-host-multiple-domain-on-apache","tag-how-to-set-up-apache-virtual-hosts-in-centos-7","tag-virtual-hosting","tag-virtual-hosting-in-apache"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.3 - aioseo.com -->\n\t<meta name=\"description\" content=\"What is Virtual Hosts\/hosting? Virtual hosting is a method for hosting multiple domain names (with separate handling of each name) on a single server (or pool of servers). This allows one server to share its resources, such as memory and processor cycles, without requiring all services provided to use the same hostname. Prerequisite is: You need to access\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Tanuj Chugh\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/cloudminister.com\/blog\/how-to-set-up-apache-virtual-hosts-in-centos-7\/\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.3\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"CloudMinister -\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"How to set up Apache virtual hosts in CentOS 7 ? - CloudMinister\" \/>\n\t\t<meta property=\"og:description\" content=\"What is Virtual Hosts\/hosting? Virtual hosting is a method for hosting multiple domain names (with separate handling of each name) on a single server (or pool of servers). This allows one server to share its resources, such as memory and processor cycles, without requiring all services provided to use the same hostname. Prerequisite is: You need to access\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/cloudminister.com\/blog\/how-to-set-up-apache-virtual-hosts-in-centos-7\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-05-01T09:32:54+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-05-01T09:32:54+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"How to set up Apache virtual hosts in CentOS 7 ? - CloudMinister\" \/>\n\t\t<meta name=\"twitter:description\" content=\"What is Virtual Hosts\/hosting? Virtual hosting is a method for hosting multiple domain names (with separate handling of each name) on a single server (or pool of servers). This allows one server to share its resources, such as memory and processor cycles, without requiring all services provided to use the same hostname. Prerequisite is: You need to access\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/how-to-set-up-apache-virtual-hosts-in-centos-7\\\/#blogposting\",\"name\":\"How to set up Apache virtual hosts in CentOS 7 ? - CloudMinister\",\"headline\":\"How to set up Apache virtual hosts in CentOS 7 ?\",\"author\":{\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/author\\\/tanuj-chugh\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/c2.jpg\",\"width\":600,\"height\":400,\"caption\":\"apache virtual host, Apache virtual hosts in CentOS 7, host multiple domain on apache, How to set up Apache virtual hosts in CentOS 7 ?  virtual hosting, virtual hosting in apache\"},\"datePublished\":\"2020-05-01T09:32:54+00:00\",\"dateModified\":\"2020-05-01T09:32:54+00:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/how-to-set-up-apache-virtual-hosts-in-centos-7\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/how-to-set-up-apache-virtual-hosts-in-centos-7\\\/#webpage\"},\"articleSection\":\"Beginner, General, How tos, Linux, apache virtual host, Apache virtual hosts in CentOS 7, host multiple domain on apache, How to set up Apache virtual hosts in CentOS 7 ?, virtual hosting, virtual hosting in apache\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/how-to-set-up-apache-virtual-hosts-in-centos-7\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/category\\\/general\\\/#listItem\",\"name\":\"General\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/category\\\/general\\\/#listItem\",\"position\":2,\"name\":\"General\",\"item\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/category\\\/general\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/how-to-set-up-apache-virtual-hosts-in-centos-7\\\/#listItem\",\"name\":\"How to set up Apache virtual hosts in CentOS 7 ?\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/how-to-set-up-apache-virtual-hosts-in-centos-7\\\/#listItem\",\"position\":3,\"name\":\"How to set up Apache virtual hosts in CentOS 7 ?\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/category\\\/general\\\/#listItem\",\"name\":\"General\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/#organization\",\"name\":\"CloudMinister\",\"url\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/author\\\/tanuj-chugh\\\/#author\",\"url\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/author\\\/tanuj-chugh\\\/\",\"name\":\"Tanuj Chugh\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/how-to-set-up-apache-virtual-hosts-in-centos-7\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3395bcaf63eb5840dd73f67c7cb69ffd3dfe33336c1bdb1f1b9aeabe5b05e15a?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Tanuj Chugh\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/how-to-set-up-apache-virtual-hosts-in-centos-7\\\/#webpage\",\"url\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/how-to-set-up-apache-virtual-hosts-in-centos-7\\\/\",\"name\":\"How to set up Apache virtual hosts in CentOS 7 ? - CloudMinister\",\"description\":\"What is Virtual Hosts\\\/hosting? Virtual hosting is a method for hosting multiple domain names (with separate handling of each name) on a single server (or pool of servers). This allows one server to share its resources, such as memory and processor cycles, without requiring all services provided to use the same hostname. Prerequisite is: You need to access\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/how-to-set-up-apache-virtual-hosts-in-centos-7\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/author\\\/tanuj-chugh\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/author\\\/tanuj-chugh\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/c2.jpg\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/how-to-set-up-apache-virtual-hosts-in-centos-7\\\/#mainImage\",\"width\":600,\"height\":400,\"caption\":\"apache virtual host, Apache virtual hosts in CentOS 7, host multiple domain on apache, How to set up Apache virtual hosts in CentOS 7 ?  virtual hosting, virtual hosting in apache\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/how-to-set-up-apache-virtual-hosts-in-centos-7\\\/#mainImage\"},\"datePublished\":\"2020-05-01T09:32:54+00:00\",\"dateModified\":\"2020-05-01T09:32:54+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/\",\"name\":\"CloudMinister\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"How to set up Apache virtual hosts in CentOS 7 ? - CloudMinister","description":"What is Virtual Hosts\/hosting? Virtual hosting is a method for hosting multiple domain names (with separate handling of each name) on a single server (or pool of servers). This allows one server to share its resources, such as memory and processor cycles, without requiring all services provided to use the same hostname. Prerequisite is: You need to access","canonical_url":"https:\/\/cloudminister.com\/blog\/how-to-set-up-apache-virtual-hosts-in-centos-7\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/cloudminister.com\/blog\/how-to-set-up-apache-virtual-hosts-in-centos-7\/#blogposting","name":"How to set up Apache virtual hosts in CentOS 7 ? - CloudMinister","headline":"How to set up Apache virtual hosts in CentOS 7 ?","author":{"@id":"https:\/\/cloudminister.com\/blog\/author\/tanuj-chugh\/#author"},"publisher":{"@id":"https:\/\/cloudminister.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/cloudminister.com\/blog\/wp-content\/uploads\/2020\/05\/c2.jpg","width":600,"height":400,"caption":"apache virtual host, Apache virtual hosts in CentOS 7, host multiple domain on apache, How to set up Apache virtual hosts in CentOS 7 ?  virtual hosting, virtual hosting in apache"},"datePublished":"2020-05-01T09:32:54+00:00","dateModified":"2020-05-01T09:32:54+00:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/cloudminister.com\/blog\/how-to-set-up-apache-virtual-hosts-in-centos-7\/#webpage"},"isPartOf":{"@id":"https:\/\/cloudminister.com\/blog\/how-to-set-up-apache-virtual-hosts-in-centos-7\/#webpage"},"articleSection":"Beginner, General, How tos, Linux, apache virtual host, Apache virtual hosts in CentOS 7, host multiple domain on apache, How to set up Apache virtual hosts in CentOS 7 ?, virtual hosting, virtual hosting in apache"},{"@type":"BreadcrumbList","@id":"https:\/\/cloudminister.com\/blog\/how-to-set-up-apache-virtual-hosts-in-centos-7\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/cloudminister.com\/blog\/#listItem","position":1,"name":"Home","item":"https:\/\/cloudminister.com\/blog\/","nextItem":{"@type":"ListItem","@id":"https:\/\/cloudminister.com\/blog\/category\/general\/#listItem","name":"General"}},{"@type":"ListItem","@id":"https:\/\/cloudminister.com\/blog\/category\/general\/#listItem","position":2,"name":"General","item":"https:\/\/cloudminister.com\/blog\/category\/general\/","nextItem":{"@type":"ListItem","@id":"https:\/\/cloudminister.com\/blog\/how-to-set-up-apache-virtual-hosts-in-centos-7\/#listItem","name":"How to set up Apache virtual hosts in CentOS 7 ?"},"previousItem":{"@type":"ListItem","@id":"https:\/\/cloudminister.com\/blog\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/cloudminister.com\/blog\/how-to-set-up-apache-virtual-hosts-in-centos-7\/#listItem","position":3,"name":"How to set up Apache virtual hosts in CentOS 7 ?","previousItem":{"@type":"ListItem","@id":"https:\/\/cloudminister.com\/blog\/category\/general\/#listItem","name":"General"}}]},{"@type":"Organization","@id":"https:\/\/cloudminister.com\/blog\/#organization","name":"CloudMinister","url":"https:\/\/cloudminister.com\/blog\/"},{"@type":"Person","@id":"https:\/\/cloudminister.com\/blog\/author\/tanuj-chugh\/#author","url":"https:\/\/cloudminister.com\/blog\/author\/tanuj-chugh\/","name":"Tanuj Chugh","image":{"@type":"ImageObject","@id":"https:\/\/cloudminister.com\/blog\/how-to-set-up-apache-virtual-hosts-in-centos-7\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/3395bcaf63eb5840dd73f67c7cb69ffd3dfe33336c1bdb1f1b9aeabe5b05e15a?s=96&d=mm&r=g","width":96,"height":96,"caption":"Tanuj Chugh"}},{"@type":"WebPage","@id":"https:\/\/cloudminister.com\/blog\/how-to-set-up-apache-virtual-hosts-in-centos-7\/#webpage","url":"https:\/\/cloudminister.com\/blog\/how-to-set-up-apache-virtual-hosts-in-centos-7\/","name":"How to set up Apache virtual hosts in CentOS 7 ? - CloudMinister","description":"What is Virtual Hosts\/hosting? Virtual hosting is a method for hosting multiple domain names (with separate handling of each name) on a single server (or pool of servers). This allows one server to share its resources, such as memory and processor cycles, without requiring all services provided to use the same hostname. Prerequisite is: You need to access","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/cloudminister.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/cloudminister.com\/blog\/how-to-set-up-apache-virtual-hosts-in-centos-7\/#breadcrumblist"},"author":{"@id":"https:\/\/cloudminister.com\/blog\/author\/tanuj-chugh\/#author"},"creator":{"@id":"https:\/\/cloudminister.com\/blog\/author\/tanuj-chugh\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/cloudminister.com\/blog\/wp-content\/uploads\/2020\/05\/c2.jpg","@id":"https:\/\/cloudminister.com\/blog\/how-to-set-up-apache-virtual-hosts-in-centos-7\/#mainImage","width":600,"height":400,"caption":"apache virtual host, Apache virtual hosts in CentOS 7, host multiple domain on apache, How to set up Apache virtual hosts in CentOS 7 ?  virtual hosting, virtual hosting in apache"},"primaryImageOfPage":{"@id":"https:\/\/cloudminister.com\/blog\/how-to-set-up-apache-virtual-hosts-in-centos-7\/#mainImage"},"datePublished":"2020-05-01T09:32:54+00:00","dateModified":"2020-05-01T09:32:54+00:00"},{"@type":"WebSite","@id":"https:\/\/cloudminister.com\/blog\/#website","url":"https:\/\/cloudminister.com\/blog\/","name":"CloudMinister","inLanguage":"en-US","publisher":{"@id":"https:\/\/cloudminister.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"CloudMinister -","og:type":"article","og:title":"How to set up Apache virtual hosts in CentOS 7 ? - CloudMinister","og:description":"What is Virtual Hosts\/hosting? Virtual hosting is a method for hosting multiple domain names (with separate handling of each name) on a single server (or pool of servers). This allows one server to share its resources, such as memory and processor cycles, without requiring all services provided to use the same hostname. Prerequisite is: You need to access","og:url":"https:\/\/cloudminister.com\/blog\/how-to-set-up-apache-virtual-hosts-in-centos-7\/","article:published_time":"2020-05-01T09:32:54+00:00","article:modified_time":"2020-05-01T09:32:54+00:00","twitter:card":"summary_large_image","twitter:title":"How to set up Apache virtual hosts in CentOS 7 ? - CloudMinister","twitter:description":"What is Virtual Hosts\/hosting? Virtual hosting is a method for hosting multiple domain names (with separate handling of each name) on a single server (or pool of servers). This allows one server to share its resources, such as memory and processor cycles, without requiring all services provided to use the same hostname. Prerequisite is: You need to access"},"aioseo_meta_data":{"post_id":"3780","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2025-05-21 07:22:48","updated":"2025-08-07 04:49:59","seo_analyzer_scan_date":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/cloudminister.com\/blog\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/cloudminister.com\/blog\/category\/general\/\" title=\"General\">General<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tHow to set up Apache virtual hosts in CentOS 7 ?\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/cloudminister.com\/blog\/"},{"label":"General","link":"https:\/\/cloudminister.com\/blog\/category\/general\/"},{"label":"How to set up Apache virtual hosts in CentOS 7 ?","link":"https:\/\/cloudminister.com\/blog\/how-to-set-up-apache-virtual-hosts-in-centos-7\/"}],"_links":{"self":[{"href":"https:\/\/cloudminister.com\/blog\/wp-json\/wp\/v2\/posts\/3780","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudminister.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudminister.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudminister.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudminister.com\/blog\/wp-json\/wp\/v2\/comments?post=3780"}],"version-history":[{"count":0,"href":"https:\/\/cloudminister.com\/blog\/wp-json\/wp\/v2\/posts\/3780\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudminister.com\/blog\/wp-json\/wp\/v2\/media\/4631"}],"wp:attachment":[{"href":"https:\/\/cloudminister.com\/blog\/wp-json\/wp\/v2\/media?parent=3780"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudminister.com\/blog\/wp-json\/wp\/v2\/categories?post=3780"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudminister.com\/blog\/wp-json\/wp\/v2\/tags?post=3780"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}