{"id":647,"date":"2012-09-13T06:19:28","date_gmt":"2012-09-13T06:19:28","guid":{"rendered":"http:\/\/codeatelier.wordpress.com\/?p=305"},"modified":"2012-09-13T06:19:28","modified_gmt":"2012-09-13T06:19:28","slug":"how-to-create-a-virtual-host-in-centos-6-3","status":"publish","type":"post","link":"https:\/\/codethataint.com\/blog\/how-to-create-a-virtual-host-in-centos-6-3\/","title":{"rendered":"How to create a Virtual Host in CentOS 6.3"},"content":{"rendered":"<p>After installing apache in CentOS it would go to Apache 2 Test Page.<\/p>\n<p>To locate this directory you need to go to \/var\/www\/<br \/>\nIn this directory you can create your file which you needs to run.<\/p>\n<p>To set up Virtual Host navigate to \/etc\/httpd\/conf\/httpd.conf file<\/p>\n<p>Open the file in gedit or editor of your preference.<\/p>\n<p>Add the lines below<\/p>\n<pre>&lt;VirtualHost *:80&gt;\n   DocumentRoot \/var\/www\/sample\/\n   ServerName virtualhost1\n&lt;\/VirtualHost&gt;<\/pre>\n<p>The document root points out to sample older in www directory<\/p>\n<p>The server name is virtual host name you type in URL<\/p>\n<p>You should also add the code in \/etc\/hosts file<\/p>\n<p>127.0.0.1\u00a0\u00a0\u00a0 virtualhost1<\/p>\n<p>&nbsp;<\/p>\n<p>Once this is done dont forget to restart apache server in terminal by typing service httpd.restart<\/p>\n<p>Now you are ready to go now.Open the browser and type http:\/\/virtualhost1\/<\/p>\n<p>Cheers!!!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After installing apache in CentOS it would go to Apache 2 Test Page. To locate this directory you need to go to \/var\/www\/ In this directory you can create your file which you needs to run. To set up Virtual Host navigate to \/etc\/httpd\/conf\/httpd.conf file Open the file in gedit or editor of your preference.&hellip; <a href=\"https:\/\/codethataint.com\/blog\/how-to-create-a-virtual-host-in-centos-6-3\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-647","post","type-post","status-publish","format-standard","hentry","category-centos"],"_links":{"self":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/647","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/comments?post=647"}],"version-history":[{"count":0,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/647\/revisions"}],"wp:attachment":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/media?parent=647"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/categories?post=647"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/tags?post=647"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}