{"id":1306,"date":"2017-04-04T17:29:46","date_gmt":"2017-04-04T11:59:46","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=1306"},"modified":"2026-08-17T18:26:21","modified_gmt":"2026-08-17T12:56:21","slug":"add-multiple-domainsvirtual-hosts-apache-ubuntu","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/add-multiple-domainsvirtual-hosts-apache-ubuntu\/","title":{"rendered":"Add Multiple Domains (Virtual Hosts) on Apache Ubuntu"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>Apache is a popular web server that can host multiple websites on a single server. This can be achieved using <strong>Apache Virtual Hosts<\/strong>, where each domain can have its own document root and configuration.<\/p>\n\n\n\n<p>For this example, we will configure two domains:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>domain1.tld<\/code><\/li>\n\n\n\n<li><code>domain2.tld<\/code><\/li>\n<\/ul>\n\n\n\n<p>Each domain will point to a separate document root.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p>Before proceeding, make sure you have:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>An Ubuntu server<\/li>\n\n\n\n<li>Apache Web Server installed<\/li>\n\n\n\n<li>Root or sudo access<\/li>\n\n\n\n<li>Two domains pointing to the server IP address<\/li>\n\n\n\n<li>Basic knowledge of Linux commands<\/li>\n<\/ol>\n\n\n\n<p>If Apache is not installed, refer to:<\/p>\n\n\n\n<p><strong>Install Apache on Ubuntu<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/pheonixsolutions.com\/blog\/install-apache-2%E2%80%A65-6-ubuntu-16-04\/?utm_source=chatgpt.com\" target=\"_blank\" rel=\"noreferrer noopener\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/install-apache-php-fpm-ubuntu-16\/\">Install Apache with php-fpm on Ubuntu 16<\/a><\/a><br><a href=\"https:\/\/pheonixsolutions.com\/blog\/how-to-install-the-apache-web-server-on-ubuntu-18-04\/\">How To Install the Apache Web Server on Ubuntu 18.04<\/a><br><a href=\"https:\/\/pheonixsolutions.com\/blog\/how-to-installcompile-apache-with-php-via-source-installation\/\">How to install\/compile Apache with PHP via source installation<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Implementation<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Create Document Root Directories<\/h3>\n\n\n\n<p>Create separate directories for both domains:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mkdir-p \/var\/www\/domain1.tldmkdir-p \/var\/www\/domain2.tld<\/pre>\n\n\n\n<p>Change the ownership to the Apache web server user:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">chown-R www-data:www-data \/var\/www\/domain1.tldchown-R www-data:www-data \/var\/www\/domain2.tld<\/pre>\n\n\n\n<p>You can then upload the respective website files into each directory.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Create Virtual Host Configuration<\/h3>\n\n\n\n<p>Create a separate Apache Virtual Host configuration for each domain.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cp \/etc\/apache2\/sites-available\/000-default.conf \\\/etc\/apache2\/sites-available\/domain1.tld.confcp \/etc\/apache2\/sites-available\/000-default.conf \\\/etc\/apache2\/sites-available\/domain2.tld.conf<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Configure Domain 1<\/h3>\n\n\n\n<p>Open the configuration file:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">vi \/etc\/apache2\/sites-available\/domain1.tld.conf<\/pre>\n\n\n\n<p>Configure the Virtual Host as follows:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;VirtualHost *:80>    <br>ServerAdmin admin@domain1.tld    <br>ServerName domain1.tld    <br>ServerAlias www.domain1.tld    <br>DocumentRoot \/var\/www\/domain1.tld<br>&lt;\/VirtualHost><\/pre>\n\n\n\n<p>Here:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>ServerName<\/code> specifies the primary domain.<\/li>\n\n\n\n<li><code>ServerAlias<\/code> allows additional names such as <code>www.domain1.tld<\/code>.<\/li>\n\n\n\n<li><code>DocumentRoot<\/code> specifies where the website files are stored.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Configure Domain 2<\/h3>\n\n\n\n<p>Open the second configuration file:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">vi \/etc\/apache2\/sites-available\/domain2.tld.conf<\/pre>\n\n\n\n<p>Add:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;VirtualHost *:80>    <br>ServerAdmin admin@domain2.tld    <br>ServerName domain2.tld    <br>ServerAlias www.domain2.tld    <br>DocumentRoot \/var\/www\/domain2.tld<br>&lt;\/VirtualHost><\/pre>\n\n\n\n<p>Now each domain has its own Virtual Host and document root.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5: Enable the Virtual Hosts<\/h2>\n\n\n\n<p>Enable both websites using <code>a2ensite<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">a2ensite domain1.tld.confa2ensite domain2.tld.conf<\/pre>\n\n\n\n<p>You can disable the default Apache site if it is not required:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">a2dissite 000-default.conf<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 6: Check Apache Configuration<\/h2>\n\n\n\n<p>Before restarting Apache, always check the configuration for syntax errors:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apachectl -t<\/pre>\n\n\n\n<p>If everything is correct, you should see:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Syntax OK<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 7: Restart Apache<\/h2>\n\n\n\n<p>Restart Apache to apply the configuration:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">systemctl restart apache2<\/pre>\n\n\n\n<p>Alternatively:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">service apache2 restart<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 8: Test the Domains<\/h2>\n\n\n\n<p>If the DNS records are already configured, access the domains from your browser:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">http:\/\/domain1.tldhttp:\/\/domain2.tld<\/pre>\n\n\n\n<p>Apache will identify the requested domain and serve the corresponding website.<\/p>\n\n\n\n<p>The traffic flow will look like:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">                Internet<br>                     |<br>              Apache Server<br>                     |<br>          +----------+----------+<br>          |                     |<br>    domain1.tld            domain2.tld<br>          |                     |<br> \/var\/www\/domain1.tld   \/var\/www\/domain2.tld<br><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Testing Before DNS Configuration<\/h2>\n\n\n\n<p>If the domains are not yet pointing to the server, you can test the Virtual Host configuration using the local <code>\/etc\/hosts<\/code> file.<\/p>\n\n\n\n<p>On a Linux or macOS system, open:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudovi \/etc\/hosts<\/pre>\n\n\n\n<p>Add:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">xx.xx.xx.xx domain1.tldxx.xx.xx.xx domain2.tld<\/pre>\n\n\n\n<p>Replace <code>xx.xx.xx.xx<\/code> with the IP address of your Apache server.<\/p>\n\n\n\n<p>You can then access the domains from your browser and verify that each domain displays its respective website.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Verification<\/h2>\n\n\n\n<p>You can also check the Virtual Hosts recognized by Apache:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apachectl -S<\/pre>\n\n\n\n<p>This command displays the configured Virtual Hosts and helps identify which domain is associated with which configuration file.<\/p>\n\n\n\n<p>For example:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">*:80    <br>domain1.tld (\/etc\/apache2\/sites-enabled\/domain1.tld.conf:1)    <br>domain2.tld (\/etc\/apache2\/sites-enabled\/domain2.tld.conf:1)<\/pre>\n\n\n\n<p>This is particularly useful when troubleshooting multiple Virtual Host configurations.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Common Issues<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Domain Shows the Wrong Website<\/h3>\n\n\n\n<p>Check the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>ServerName<\/code><\/li>\n\n\n\n<li><code>ServerAlias<\/code><\/li>\n\n\n\n<li><code>DocumentRoot<\/code><\/li>\n\n\n\n<li>DNS records<\/li>\n\n\n\n<li>Enabled Virtual Host configurations<\/li>\n<\/ul>\n\n\n\n<p>You can use:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apachectl -S<\/pre>\n\n\n\n<p>to identify which Virtual Host Apache is using.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Apache Configuration Error<\/h3>\n\n\n\n<p>Run:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apachectl -t<\/pre>\n\n\n\n<p>Check the reported configuration file and line number, correct the issue, and test again.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Domain Is Not Reachable<\/h3>\n\n\n\n<p>Verify that the domain&#8217;s DNS record points to the correct server IP:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">domain1.tld  \u2192  Server IPdomain2.tld  \u2192  Server IP<\/pre>\n\n\n\n<p>Also make sure HTTP port <code>80<\/code> is allowed through the server firewall or cloud security rules.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>Apache Virtual Hosts make it possible to host multiple domains on a single Ubuntu server while keeping each website&#8217;s files and configuration separate.<\/p>\n\n\n\n<p>The basic process is:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Create a document root for each domain.<\/li>\n\n\n\n<li>Create a Virtual Host configuration for each domain.<\/li>\n\n\n\n<li>Configure <code>ServerName<\/code>, <code>ServerAlias<\/code>, and <code>DocumentRoot<\/code>.<\/li>\n\n\n\n<li>Enable the Virtual Hosts.<\/li>\n\n\n\n<li>Test the Apache configuration.<\/li>\n\n\n\n<li>Restart Apache.<\/li>\n\n\n\n<li>Verify the domains.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Apache is a popular web server that can host multiple websites on a single server. This can be achieved using Apache Virtual Hosts, where each domain can have its own document root and configuration. For this example, we will configure two domains: Each domain will point to a separate&hellip; <a href=\"https:\/\/pheonixsolutions.com\/blog\/add-multiple-domainsvirtual-hosts-apache-ubuntu\/\" class=\"more-link read-more\" rel=\"bookmark\">Continue Reading <span class=\"screen-reader-text\">Add Multiple Domains (Virtual Hosts) on Apache Ubuntu<\/span><i class=\"fa fa-arrow-right\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[313,225,282],"tags":[278,261],"class_list":{"0":"post-1306","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-apache","7":"category-linux","8":"category-ubuntu","9":"tag-apache","10":"tag-linux","11":"h-entry","13":"h-as-article"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Pheonix Solutions - We Empower Your Business Growth<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/pheonixsolutions.com\/blog\/add-multiple-domainsvirtual-hosts-apache-ubuntu\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Pheonix Solutions - We Empower Your Business Growth\" \/>\n<meta property=\"og:description\" content=\"Introduction Apache is a popular web server that can host multiple websites on a single server. This can be achieved using Apache Virtual Hosts, where each domain can have its own document root and configuration. For this example, we will configure two domains: Each domain will point to a separate&hellip; Continue Reading Add Multiple Domains (Virtual Hosts) on Apache Ubuntu\" \/>\n<meta property=\"og:url\" content=\"https:\/\/pheonixsolutions.com\/blog\/add-multiple-domainsvirtual-hosts-apache-ubuntu\/\" \/>\n<meta property=\"og:site_name\" content=\"PHEONIXSOLUTIONS\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/PheonixSolutions-209942982759387\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-04-04T11:59:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-08-17T12:56:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2016\/09\/PX2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"3837\" \/>\n\t<meta property=\"og:image:height\" content=\"2540\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@pheonixsolution\" \/>\n<meta name=\"twitter:site\" content=\"@pheonixsolution\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/add-multiple-domainsvirtual-hosts-apache-ubuntu\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/add-multiple-domainsvirtual-hosts-apache-ubuntu\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/0ffa33d73c869faec2d50e79c24e3503\"},\"headline\":\"Add Multiple Domains (Virtual Hosts) on Apache Ubuntu\",\"datePublished\":\"2017-04-04T11:59:46+00:00\",\"dateModified\":\"2026-08-17T12:56:21+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/add-multiple-domainsvirtual-hosts-apache-ubuntu\\\/\"},\"wordCount\":547,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#organization\"},\"keywords\":[\"Apache\",\"Linux\"],\"articleSection\":[\"Apache\",\"Linux\",\"Ubuntu\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/add-multiple-domainsvirtual-hosts-apache-ubuntu\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/add-multiple-domainsvirtual-hosts-apache-ubuntu\\\/\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/add-multiple-domainsvirtual-hosts-apache-ubuntu\\\/\",\"name\":\"Pheonix Solutions - We Empower Your Business Growth\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#website\"},\"datePublished\":\"2017-04-04T11:59:46+00:00\",\"dateModified\":\"2026-08-17T12:56:21+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/add-multiple-domainsvirtual-hosts-apache-ubuntu\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/add-multiple-domainsvirtual-hosts-apache-ubuntu\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/add-multiple-domainsvirtual-hosts-apache-ubuntu\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Add Multiple Domains (Virtual Hosts) on Apache Ubuntu\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/\",\"name\":\"Pheonix Solutions\",\"description\":\"We Empower Your Business Growth\",\"publisher\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#organization\",\"name\":\"PheonixSolutions\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/12\\\/logo.png\",\"contentUrl\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/12\\\/logo.png\",\"width\":454,\"height\":300,\"caption\":\"PheonixSolutions\"},\"image\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/PheonixSolutions-209942982759387\\\/\",\"https:\\\/\\\/x.com\\\/pheonixsolution\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/0ffa33d73c869faec2d50e79c24e3503\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/09bacc0294abee1322a23ab4bc6a0330dd4cb4df707dc9d0b0efeba6c109608b?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/09bacc0294abee1322a23ab4bc6a0330dd4cb4df707dc9d0b0efeba6c109608b?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/09bacc0294abee1322a23ab4bc6a0330dd4cb4df707dc9d0b0efeba6c109608b?s=96&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"http:\\\/\\\/pheonixsolutions.com\\\/blog\"],\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Pheonix Solutions - We Empower Your Business Growth","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/pheonixsolutions.com\/blog\/add-multiple-domainsvirtual-hosts-apache-ubuntu\/","og_locale":"en_US","og_type":"article","og_title":"Pheonix Solutions - We Empower Your Business Growth","og_description":"Introduction Apache is a popular web server that can host multiple websites on a single server. This can be achieved using Apache Virtual Hosts, where each domain can have its own document root and configuration. For this example, we will configure two domains: Each domain will point to a separate&hellip; Continue Reading Add Multiple Domains (Virtual Hosts) on Apache Ubuntu","og_url":"https:\/\/pheonixsolutions.com\/blog\/add-multiple-domainsvirtual-hosts-apache-ubuntu\/","og_site_name":"PHEONIXSOLUTIONS","article_publisher":"https:\/\/www.facebook.com\/PheonixSolutions-209942982759387\/","article_published_time":"2017-04-04T11:59:46+00:00","article_modified_time":"2026-08-17T12:56:21+00:00","og_image":[{"width":3837,"height":2540,"url":"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2016\/09\/PX2.png","type":"image\/png"}],"author":"admin","twitter_card":"summary_large_image","twitter_creator":"@pheonixsolution","twitter_site":"@pheonixsolution","twitter_misc":{"Written by":"admin","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/pheonixsolutions.com\/blog\/add-multiple-domainsvirtual-hosts-apache-ubuntu\/#article","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/blog\/add-multiple-domainsvirtual-hosts-apache-ubuntu\/"},"author":{"name":"admin","@id":"https:\/\/pheonixsolutions.com\/blog\/#\/schema\/person\/0ffa33d73c869faec2d50e79c24e3503"},"headline":"Add Multiple Domains (Virtual Hosts) on Apache Ubuntu","datePublished":"2017-04-04T11:59:46+00:00","dateModified":"2026-08-17T12:56:21+00:00","mainEntityOfPage":{"@id":"https:\/\/pheonixsolutions.com\/blog\/add-multiple-domainsvirtual-hosts-apache-ubuntu\/"},"wordCount":547,"commentCount":0,"publisher":{"@id":"https:\/\/pheonixsolutions.com\/blog\/#organization"},"keywords":["Apache","Linux"],"articleSection":["Apache","Linux","Ubuntu"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/pheonixsolutions.com\/blog\/add-multiple-domainsvirtual-hosts-apache-ubuntu\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/pheonixsolutions.com\/blog\/add-multiple-domainsvirtual-hosts-apache-ubuntu\/","url":"https:\/\/pheonixsolutions.com\/blog\/add-multiple-domainsvirtual-hosts-apache-ubuntu\/","name":"Pheonix Solutions - We Empower Your Business Growth","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/blog\/#website"},"datePublished":"2017-04-04T11:59:46+00:00","dateModified":"2026-08-17T12:56:21+00:00","breadcrumb":{"@id":"https:\/\/pheonixsolutions.com\/blog\/add-multiple-domainsvirtual-hosts-apache-ubuntu\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/pheonixsolutions.com\/blog\/add-multiple-domainsvirtual-hosts-apache-ubuntu\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/pheonixsolutions.com\/blog\/add-multiple-domainsvirtual-hosts-apache-ubuntu\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/pheonixsolutions.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Add Multiple Domains (Virtual Hosts) on Apache Ubuntu"}]},{"@type":"WebSite","@id":"https:\/\/pheonixsolutions.com\/blog\/#website","url":"https:\/\/pheonixsolutions.com\/blog\/","name":"Pheonix Solutions","description":"We Empower Your Business Growth","publisher":{"@id":"https:\/\/pheonixsolutions.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/pheonixsolutions.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/pheonixsolutions.com\/blog\/#organization","name":"PheonixSolutions","url":"https:\/\/pheonixsolutions.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/pheonixsolutions.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2016\/12\/logo.png","contentUrl":"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2016\/12\/logo.png","width":454,"height":300,"caption":"PheonixSolutions"},"image":{"@id":"https:\/\/pheonixsolutions.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/PheonixSolutions-209942982759387\/","https:\/\/x.com\/pheonixsolution"]},{"@type":"Person","@id":"https:\/\/pheonixsolutions.com\/blog\/#\/schema\/person\/0ffa33d73c869faec2d50e79c24e3503","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/09bacc0294abee1322a23ab4bc6a0330dd4cb4df707dc9d0b0efeba6c109608b?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/09bacc0294abee1322a23ab4bc6a0330dd4cb4df707dc9d0b0efeba6c109608b?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/09bacc0294abee1322a23ab4bc6a0330dd4cb4df707dc9d0b0efeba6c109608b?s=96&r=g","caption":"admin"},"sameAs":["http:\/\/pheonixsolutions.com\/blog"],"url":"https:\/\/pheonixsolutions.com\/blog\/author\/admin\/"}]}},"jetpack_shortlink":"https:\/\/wp.me\/p7F4uM-l4","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1306","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=1306"}],"version-history":[{"count":1,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1306\/revisions"}],"predecessor-version":[{"id":10864,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1306\/revisions\/10864"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=1306"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=1306"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=1306"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}