{"id":19849,"date":"2020-12-05T14:03:32","date_gmt":"2020-12-05T14:03:32","guid":{"rendered":"http:\/\/www.devopsschool.com\/blog\/?p=19849"},"modified":"2021-10-29T05:38:57","modified_gmt":"2021-10-29T05:38:57","slug":"setup-multiple-domain-with-apache2-with-httpd-vhosts-conf-virtualhost-examples","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/setup-multiple-domain-with-apache2-with-httpd-vhosts-conf-virtualhost-examples\/","title":{"rendered":"Setup multiple domain with Apache2 with httpd-vhosts.conf VirtualHost Examples"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Setup multiple domain with Apache2 with httpd-vhosts.conf<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Setup multiple domain with Apache2 on Same Port<\/li><li>Setup multiple domain with Apache2 on Same Port<\/li><li>Setup multiple domain with Apache2 on Different port using Proxy<\/li><li>Setup to Running several name-based domain web sites on a single IP address<\/li><li>Setup Name-based hosts on more than one IP address.<\/li><li>Serving the same content on different IP addresses (such as an internal and external address).<\/li><li>Running different sites on different ports.<\/li><li>IP-based virtual hosting<\/li><li>Mixed port-based and ip-based virtual hosts<\/li><li>Mixed name-based and IP-based vhosts<\/li><li>Using Virtual_host and mod_proxy together<\/li><li>Migrating a name-based vhost to an IP-based vhost<\/li><li>Using the ServerPath directive<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Following are the url reference for the same<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"http:\/\/httpd.apache.org\/docs\/2.2\/vhosts\/examples.html\" target=\"_blank\" rel=\"noopener\">http:\/\/httpd.apache.org\/docs\/2.2\/vhosts\/examples.html<\/a><\/li><li><a href=\"http:\/\/ajaxray.com\/blog\/multiple-sites-with-apache-server-on-different-ports-or-domains\/\" target=\"_blank\" rel=\"noopener\">http:\/\/ajaxray.com\/blog\/multiple-sites-with-apache-server-on-different-ports-or-domains\/<\/a><\/li><li><a href=\"https:\/\/geekflare.com\/multiple-domains-on-one-server-with-apache-nginx\/\" target=\"_blank\" rel=\"noopener\">https:\/\/geekflare.com\/multiple-domains-on-one-server-with-apache-nginx\/<\/a><\/li><li><a href=\"https:\/\/serverfault.com\/questions\/195611\/how-do-i-redirect-subdomains-to-a-different-port-on-the-same-server\" target=\"_blank\" rel=\"noopener\">https:\/\/serverfault.com\/questions\/195611\/how-do-i-redirect-subdomains-to-a-different-port-on-the-same-server<\/a><\/li><li><a href=\"https:\/\/serverfault.com\/questions\/195611\/how-do-i-redirect-subdomains-to-a-different-port-on-the-same-server\" target=\"_blank\" rel=\"noopener\">https:\/\/serverfault.com\/questions\/195611\/how-do-i-redirect-subdomains-to-a-different-port-on-the-same-server<\/a><\/li><li><a href=\"https:\/\/www.digitalocean.com\/community\/questions\/how-do-i-point-my-custom-domain-to-my-ip-port-41-111-20-36-8080\" target=\"_blank\" rel=\"noopener\">https:\/\/www.digitalocean.com\/community\/questions\/how-do-i-point-my-custom-domain-to-my-ip-port-41-111-20-36-8080<\/a><\/li><li><a href=\"https:\/\/www.digitalocean.com\/community\/questions\/how-do-i-point-my-custom-domain-to-my-ip-port-41-111-20-36-8080\" target=\"_blank\" rel=\"noopener\">https:\/\/www.digitalocean.com\/community\/questions\/how-do-i-point-my-custom-domain-to-my-ip-port-41-111-20-36-8080<\/a><\/li><li><a href=\"https:\/\/stackoverflow.com\/questions\/7942372\/can-i-configure-a-subdomain-to-point-to-a-specific-port-on-my-server\" target=\"_blank\" rel=\"noopener\">https:\/\/stackoverflow.com\/questions\/7942372\/can-i-configure-a-subdomain-to-point-to-a-specific-port-on-my-server<\/a><\/li><li><a href=\"https:\/\/stackoverflow.com\/questions\/7942372\/can-i-configure-a-subdomain-to-point-to-a-specific-port-on-my-server\" target=\"_blank\" rel=\"noopener\">https:\/\/stackoverflow.com\/questions\/7942372\/can-i-configure-a-subdomain-to-point-to-a-specific-port-on-my-server<\/a><\/li><li><a href=\"https:\/\/stackoverflow.com\/questions\/25971399\/create-a-domain-name-pointing-to-an-ip-of-port-different-than-80\" target=\"_blank\" rel=\"noopener\">https:\/\/stackoverflow.com\/questions\/25971399\/create-a-domain-name-pointing-to-an-ip-of-port-different-than-80<\/a><\/li><\/ul>\n\n\n<div class=\"epyt-gallery\" data-currpage=\"1\" id=\"epyt_gallery_71937\"><iframe loading=\"lazy\"  id=\"_ytid_21661\"  width=\"760\" height=\"427\"  data-origwidth=\"760\" data-origheight=\"427\" src=\"https:\/\/www.youtube.com\/embed\/?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  data-epytgalleryid=\"epyt_gallery_71937\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe><div class=\"epyt-gallery-list\"><div>Sorry, there was a YouTube error.<\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Setup multiple domain with Apache2 with httpd-vhosts.conf Setup multiple domain with Apache2 on Same Port Setup multiple domain with Apache2 on Same Port Setup multiple domain with Apache2 on Different&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[2],"tags":[],"class_list":["post-19849","post","type-post","status-publish","format-standard","hentry","category-uncategorised"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/19849","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=19849"}],"version-history":[{"count":3,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/19849\/revisions"}],"predecessor-version":[{"id":24503,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/19849\/revisions\/24503"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=19849"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=19849"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=19849"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}