{"id":2189,"date":"2014-04-21T14:59:41","date_gmt":"2014-04-21T14:59:41","guid":{"rendered":"http:\/\/www.andrewhope.co.uk\/Blog\/?p=2189"},"modified":"2022-05-14T20:13:19","modified_gmt":"2022-05-14T19:13:19","slug":"virtual-hosts","status":"publish","type":"post","link":"https:\/\/www.andrewhope.co.uk\/Blog\/virtual-hosts\/","title":{"rendered":"Virtual Hosts"},"content":{"rendered":"<p>Every now and then I come across a stupidly annoying problem with my website and it&#8217;s configuration before I can move on. This time it&#8217;s virtual hosts. Apache has the ability to allow you to host mobile domain names from the same directory and web server using the virtual hosts configuration.<\/p>\n<p>&nbsp;<\/p>\n<p>I&#8217;m currently at this stage. I own more than one domain name and it&#8217;s annoying me.<\/p>\n<p>I&#8217;m currently experiencing two problems with the domain<\/p>\n<ul>\n<li>Apache not &#8220;serving&#8221; the index page for the virtual host directory. All it is serving is blank pages.<\/li>\n<\/ul>\n<p><b>Initially I thought this was a permission problem. I later identified it and remembered it was the cause of problem#2 which is why I gave up in the first place. For reference, in the httpd.conf file there is a section called\u00a0<em>Include<\/em><\/b><em> conf\/extra\/httpd-vhosts.conf\u00a0<\/em><strong>this must be enabled (remove #) otherwise it won&#8217;t load the files<\/strong><\/p>\n<ul>\n<li>Apache now serves the home pages and finds them, but ignores the main \/www root of the web server and goes straight to the virtual host directory<\/li>\n<\/ul>\n<p><strong>This is the current problem I&#8217;m encountering. Once I work out the virtual hosts configuration issue, I will post an update for future reference if I need to go back to it. Or help someone else out<\/strong><\/p>\n<p>I did a quick google search and find this post. Free link.<\/p>\n<p>http:\/\/blog-rat.blogspot.co.uk\/2009\/05\/apache-ignores-documentroot-in.html<\/p>\n<p>&nbsp;<\/p>\n<p>I&#8217;m currently researching it<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Every now and then I come across a stupidly annoying problem with my website and it&#8217;s configuration before I can [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wprm-recipe-roundup-name":"","wprm-recipe-roundup-description":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":"","_links_to":"","_links_to_target":""},"categories":[4],"tags":[274,572,570,571,403,569],"class_list":["post-2189","post","type-post","status-publish","format-standard","hentry","category-it","tag-apache","tag-blank-directory","tag-blank-page","tag-not-serving-directory","tag-not-working","tag-virtual-hosts"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.1.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"Every now and then I come across a stupidly annoying problem with my website and it&#039;s configuration before I can move on. This time it&#039;s virtual hosts. Apache has the ability to allow you to host mobile domain names from the same directory and web server using the virtual hosts configuration. I&#039;m currently at\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"admin\"\/>\n\t<meta name=\"msvalidate.01\" content=\"95C2F67592576EDF87B6C4B9774D0014\" \/>\n\t<meta name=\"keywords\" content=\"apache,blank directory,blank page,not serving directory,not working,virtual hosts,it\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.andrewhope.co.uk\/Blog\/virtual-hosts\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.1.1\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.andrewhope.co.uk\\\/Blog\\\/virtual-hosts\\\/#article\",\"name\":\"Virtual Hosts | Andrew Hope\",\"headline\":\"Virtual Hosts\",\"author\":{\"@id\":\"https:\\\/\\\/www.andrewhope.co.uk\\\/Blog\\\/author\\\/admin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.andrewhope.co.uk\\\/Blog\\\/#person\"},\"datePublished\":\"2014-04-21T14:59:41+01:00\",\"dateModified\":\"2022-05-14T20:13:19+01:00\",\"inLanguage\":\"en-GB\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.andrewhope.co.uk\\\/Blog\\\/virtual-hosts\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.andrewhope.co.uk\\\/Blog\\\/virtual-hosts\\\/#webpage\"},\"articleSection\":\"IT, apache, blank directory, blank page, not serving directory, not working, virtual hosts\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.andrewhope.co.uk\\\/Blog\\\/virtual-hosts\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.andrewhope.co.uk\\\/Blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.andrewhope.co.uk\\\/Blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.andrewhope.co.uk\\\/Blog\\\/category\\\/it\\\/#listItem\",\"name\":\"IT\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.andrewhope.co.uk\\\/Blog\\\/category\\\/it\\\/#listItem\",\"position\":2,\"name\":\"IT\",\"item\":\"https:\\\/\\\/www.andrewhope.co.uk\\\/Blog\\\/category\\\/it\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.andrewhope.co.uk\\\/Blog\\\/virtual-hosts\\\/#listItem\",\"name\":\"Virtual Hosts\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.andrewhope.co.uk\\\/Blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.andrewhope.co.uk\\\/Blog\\\/virtual-hosts\\\/#listItem\",\"position\":3,\"name\":\"Virtual Hosts\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.andrewhope.co.uk\\\/Blog\\\/category\\\/it\\\/#listItem\",\"name\":\"IT\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.andrewhope.co.uk\\\/Blog\\\/#person\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.andrewhope.co.uk\\\/Blog\\\/author\\\/admin\\\/#author\",\"url\":\"https:\\\/\\\/www.andrewhope.co.uk\\\/Blog\\\/author\\\/admin\\\/\",\"name\":\"admin\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.andrewhope.co.uk\\\/Blog\\\/virtual-hosts\\\/#webpage\",\"url\":\"https:\\\/\\\/www.andrewhope.co.uk\\\/Blog\\\/virtual-hosts\\\/\",\"name\":\"Virtual Hosts | Andrew Hope\",\"description\":\"Every now and then I come across a stupidly annoying problem with my website and it's configuration before I can move on. This time it's virtual hosts. Apache has the ability to allow you to host mobile domain names from the same directory and web server using the virtual hosts configuration. I'm currently at\",\"inLanguage\":\"en-GB\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.andrewhope.co.uk\\\/Blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.andrewhope.co.uk\\\/Blog\\\/virtual-hosts\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.andrewhope.co.uk\\\/Blog\\\/author\\\/admin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.andrewhope.co.uk\\\/Blog\\\/author\\\/admin\\\/#author\"},\"datePublished\":\"2014-04-21T14:59:41+01:00\",\"dateModified\":\"2022-05-14T20:13:19+01:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.andrewhope.co.uk\\\/Blog\\\/#website\",\"url\":\"https:\\\/\\\/www.andrewhope.co.uk\\\/Blog\\\/\",\"name\":\"Andrew Hope\",\"description\":\"DIY, Gaming, Automotive Chat and Invention\",\"inLanguage\":\"en-GB\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.andrewhope.co.uk\\\/Blog\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Virtual Hosts | Andrew Hope","description":"Every now and then I come across a stupidly annoying problem with my website and it's configuration before I can move on. This time it's virtual hosts. Apache has the ability to allow you to host mobile domain names from the same directory and web server using the virtual hosts configuration. I'm currently at","canonical_url":"https:\/\/www.andrewhope.co.uk\/Blog\/virtual-hosts\/","robots":"max-image-preview:large","keywords":"apache,blank directory,blank page,not serving directory,not working,virtual hosts,it","webmasterTools":{"msvalidate.01":"95C2F67592576EDF87B6C4B9774D0014","miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.andrewhope.co.uk\/Blog\/virtual-hosts\/#article","name":"Virtual Hosts | Andrew Hope","headline":"Virtual Hosts","author":{"@id":"https:\/\/www.andrewhope.co.uk\/Blog\/author\/admin\/#author"},"publisher":{"@id":"https:\/\/www.andrewhope.co.uk\/Blog\/#person"},"datePublished":"2014-04-21T14:59:41+01:00","dateModified":"2022-05-14T20:13:19+01:00","inLanguage":"en-GB","mainEntityOfPage":{"@id":"https:\/\/www.andrewhope.co.uk\/Blog\/virtual-hosts\/#webpage"},"isPartOf":{"@id":"https:\/\/www.andrewhope.co.uk\/Blog\/virtual-hosts\/#webpage"},"articleSection":"IT, apache, blank directory, blank page, not serving directory, not working, virtual hosts"},{"@type":"BreadcrumbList","@id":"https:\/\/www.andrewhope.co.uk\/Blog\/virtual-hosts\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.andrewhope.co.uk\/Blog#listItem","position":1,"name":"Home","item":"https:\/\/www.andrewhope.co.uk\/Blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.andrewhope.co.uk\/Blog\/category\/it\/#listItem","name":"IT"}},{"@type":"ListItem","@id":"https:\/\/www.andrewhope.co.uk\/Blog\/category\/it\/#listItem","position":2,"name":"IT","item":"https:\/\/www.andrewhope.co.uk\/Blog\/category\/it\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.andrewhope.co.uk\/Blog\/virtual-hosts\/#listItem","name":"Virtual Hosts"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.andrewhope.co.uk\/Blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.andrewhope.co.uk\/Blog\/virtual-hosts\/#listItem","position":3,"name":"Virtual Hosts","previousItem":{"@type":"ListItem","@id":"https:\/\/www.andrewhope.co.uk\/Blog\/category\/it\/#listItem","name":"IT"}}]},{"@type":"Person","@id":"https:\/\/www.andrewhope.co.uk\/Blog\/#person"},{"@type":"Person","@id":"https:\/\/www.andrewhope.co.uk\/Blog\/author\/admin\/#author","url":"https:\/\/www.andrewhope.co.uk\/Blog\/author\/admin\/","name":"admin"},{"@type":"WebPage","@id":"https:\/\/www.andrewhope.co.uk\/Blog\/virtual-hosts\/#webpage","url":"https:\/\/www.andrewhope.co.uk\/Blog\/virtual-hosts\/","name":"Virtual Hosts | Andrew Hope","description":"Every now and then I come across a stupidly annoying problem with my website and it's configuration before I can move on. This time it's virtual hosts. Apache has the ability to allow you to host mobile domain names from the same directory and web server using the virtual hosts configuration. I'm currently at","inLanguage":"en-GB","isPartOf":{"@id":"https:\/\/www.andrewhope.co.uk\/Blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.andrewhope.co.uk\/Blog\/virtual-hosts\/#breadcrumblist"},"author":{"@id":"https:\/\/www.andrewhope.co.uk\/Blog\/author\/admin\/#author"},"creator":{"@id":"https:\/\/www.andrewhope.co.uk\/Blog\/author\/admin\/#author"},"datePublished":"2014-04-21T14:59:41+01:00","dateModified":"2022-05-14T20:13:19+01:00"},{"@type":"WebSite","@id":"https:\/\/www.andrewhope.co.uk\/Blog\/#website","url":"https:\/\/www.andrewhope.co.uk\/Blog\/","name":"Andrew Hope","description":"DIY, Gaming, Automotive Chat and Invention","inLanguage":"en-GB","publisher":{"@id":"https:\/\/www.andrewhope.co.uk\/Blog\/#person"}}]}},"aioseo_meta_data":{"post_id":"2189","title":null,"description":null,"keywords":[],"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"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":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"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":"{\"article\":{\"articleType\":\"BlogPosting\"},\"course\":{\"name\":\"\",\"description\":\"\",\"provider\":\"\"},\"faq\":{\"pages\":[]},\"product\":{\"reviews\":[]},\"recipe\":{\"ingredients\":[],\"instructions\":[],\"keywords\":[]},\"software\":{\"reviews\":[],\"operatingSystems\":[]},\"webPage\":{\"webPageType\":\"WebPage\"}}","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":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2020-12-21 13:50:36","updated":"2025-06-04 21:32:02","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:\/\/www.andrewhope.co.uk\/Blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.andrewhope.co.uk\/Blog\/category\/it\/\" title=\"IT\">IT<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tVirtual Hosts\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.andrewhope.co.uk\/Blog"},{"label":"IT","link":"https:\/\/www.andrewhope.co.uk\/Blog\/category\/it\/"},{"label":"Virtual Hosts","link":"https:\/\/www.andrewhope.co.uk\/Blog\/virtual-hosts\/"}],"views":136,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.andrewhope.co.uk\/Blog\/wp-json\/wp\/v2\/posts\/2189","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.andrewhope.co.uk\/Blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.andrewhope.co.uk\/Blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.andrewhope.co.uk\/Blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.andrewhope.co.uk\/Blog\/wp-json\/wp\/v2\/comments?post=2189"}],"version-history":[{"count":0,"href":"https:\/\/www.andrewhope.co.uk\/Blog\/wp-json\/wp\/v2\/posts\/2189\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.andrewhope.co.uk\/Blog\/wp-json\/wp\/v2\/media?parent=2189"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.andrewhope.co.uk\/Blog\/wp-json\/wp\/v2\/categories?post=2189"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.andrewhope.co.uk\/Blog\/wp-json\/wp\/v2\/tags?post=2189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}