{"id":5714,"date":"2023-02-16T15:34:00","date_gmt":"2023-02-16T10:04:00","guid":{"rendered":"https:\/\/trysiteprice.com\/blog\/?p=5714"},"modified":"2023-02-16T15:34:00","modified_gmt":"2023-02-16T10:04:00","slug":"apache-ipv6-configuration-dual-stacked-ipv4-ipv6-virtual-hosts","status":"publish","type":"post","link":"https:\/\/trysiteprice.com\/blog\/apache-ipv6-configuration-dual-stacked-ipv4-ipv6-virtual-hosts\/","title":{"rendered":"Apache IPv6 Configuration: Dual Stacked IPv4 &#038; IPv6 Virtual Hosts"},"content":{"rendered":"<p>To configure Apache to serve dual stacked IPv4 and IPv6 virtual hosts, you need to follow these steps:<\/p>\n<ol>\n<li>Make sure that your Apache installation supports IPv6. You can check this by running the following command:\n<div class=\"bg-black mb-4 rounded-md\">\n<div class=\"flex items-center relative text-gray-200 bg-gray-800 px-4 py-2 text-xs font-sans\"><\/div>\n<div class=\"p-4 overflow-y-auto\"><code class=\"!whitespace-pre hljs language-css\">httpd -V | grep -<span class=\"hljs-selector-tag\">i<\/span> ipv6<br \/>\n<\/code><\/div>\n<\/div>\n<p>If IPv6 support is enabled, you will see a line containing <code>--enable-ipv6<\/code>.<\/li>\n<li>Edit the Apache configuration file for the virtual host you want to add IPv6 support to. This file is usually located in the <code>\/etc\/httpd\/conf.d<\/code> directory, and has a name ending in <code>.conf<\/code>.<\/li>\n<li>Add the following lines to the configuration file, replacing the values in square brackets with the appropriate values for your virtual host:\n<div class=\"bg-black mb-4 rounded-md\">\n<div class=\"flex items-center relative text-gray-200 bg-gray-800 px-4 py-2 text-xs font-sans\"><\/div>\n<div class=\"p-4 overflow-y-auto\"><code class=\"!whitespace-pre hljs language-python\">Listen [::]:<span class=\"hljs-number\">80<\/span><br \/>\n&lt;VirtualHost [::]:<span class=\"hljs-number\">80<\/span>&gt;<br \/>\n  <span class=\"hljs-comment\"># Configuration directives for your virtual host<\/span><br \/>\n&lt;\/VirtualHost&gt;<br \/>\n<\/code><\/div>\n<\/div>\n<p>These lines will configure Apache to listen on IPv6 address <code>[::]:80<\/code> for this virtual host, as well as on the default IPv4 address <code>0.0.0.0:80<\/code>.<\/li>\n<li>Test the configuration by restarting Apache:\n<div class=\"bg-black mb-4 rounded-md\">\n<div class=\"flex items-center relative text-gray-200 bg-gray-800 px-4 py-2 text-xs font-sans\"><\/div>\n<div class=\"p-4 overflow-y-auto\"><code class=\"!whitespace-pre hljs\">sudo service httpd restart<br \/>\n<\/code><\/div>\n<\/div>\n<p>If the Apache configuration is correct, it should restart without any errors.<\/li>\n<li>Verify that the virtual host is now accessible over IPv6 by visiting the website using an IPv6 address in your web browser. You can also use the <code>curl<\/code> command to test the virtual host using IPv6:\n<div class=\"bg-black mb-4 rounded-md\">\n<div class=\"flex items-center relative text-gray-200 bg-gray-800 px-4 py-2 text-xs font-sans\"><\/div>\n<div class=\"p-4 overflow-y-auto\"><code class=\"!whitespace-pre hljs language-javascript\">curl -<span class=\"hljs-number\">6<\/span> <span class=\"hljs-attr\">http<\/span>:<span class=\"hljs-comment\">\/\/[IPv6-address]\/<\/span><br \/>\n<\/code><\/div>\n<\/div>\n<p>This will connect to the virtual host using IPv6.<\/li>\n<\/ol>\n<p>Repeat these steps for any additional virtual hosts you want to add IPv6 support to. With these steps, you have successfully configured Apache to serve dual stacked IPv4 and IPv6 virtual hosts.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To configure Apache to serve dual stacked IPv4 and IPv6 virtual hosts, you need to follow these steps: Make sure that your Apache installation supports IPv6. You can check this by running the following command: httpd -V | grep -i ipv6 If IPv6 support is enabled, you will see a line containing &#8211;enable-ipv6. Edit the &#8230; <a title=\"Apache IPv6 Configuration: Dual Stacked IPv4 &#038; IPv6 Virtual Hosts\" class=\"read-more\" href=\"https:\/\/trysiteprice.com\/blog\/apache-ipv6-configuration-dual-stacked-ipv4-ipv6-virtual-hosts\/\" aria-label=\"Read more about Apache IPv6 Configuration: Dual Stacked IPv4 &#038; IPv6 Virtual Hosts\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5714","post","type-post","status-publish","format-standard","hentry","category-best-tutorial"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Apache IPv6 Configuration: Dual Stacked IPv4 &amp; IPv6 Virtual Hosts - TrySitePrice<\/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:\/\/trysiteprice.com\/blog\/apache-ipv6-configuration-dual-stacked-ipv4-ipv6-virtual-hosts\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Apache IPv6 Configuration: Dual Stacked IPv4 &amp; IPv6 Virtual Hosts - TrySitePrice\" \/>\n<meta property=\"og:description\" content=\"To configure Apache to serve dual stacked IPv4 and IPv6 virtual hosts, you need to follow these steps: Make sure that your Apache installation supports IPv6. You can check this by running the following command: httpd -V | grep -i ipv6 If IPv6 support is enabled, you will see a line containing --enable-ipv6. Edit the ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/trysiteprice.com\/blog\/apache-ipv6-configuration-dual-stacked-ipv4-ipv6-virtual-hosts\/\" \/>\n<meta property=\"og:site_name\" content=\"TrySitePrice\" \/>\n<meta property=\"article:published_time\" content=\"2023-02-16T10:04:00+00:00\" \/>\n<meta name=\"author\" content=\"Rahul Sahu\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/trysiteprice.com\/blog\/apache-ipv6-configuration-dual-stacked-ipv4-ipv6-virtual-hosts\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/trysiteprice.com\/blog\/apache-ipv6-configuration-dual-stacked-ipv4-ipv6-virtual-hosts\/\"},\"author\":{\"name\":\"Rahul Sahu\",\"@id\":\"https:\/\/trysiteprice.com\/blog\/#\/schema\/person\/358e04eeea4281deacad2f30c58e67f4\"},\"headline\":\"Apache IPv6 Configuration: Dual Stacked IPv4 &#038; IPv6 Virtual Hosts\",\"datePublished\":\"2023-02-16T10:04:00+00:00\",\"dateModified\":\"2023-02-16T10:04:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/trysiteprice.com\/blog\/apache-ipv6-configuration-dual-stacked-ipv4-ipv6-virtual-hosts\/\"},\"wordCount\":223,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/trysiteprice.com\/blog\/#organization\"},\"articleSection\":[\"Best\/Tutorial\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/trysiteprice.com\/blog\/apache-ipv6-configuration-dual-stacked-ipv4-ipv6-virtual-hosts\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/trysiteprice.com\/blog\/apache-ipv6-configuration-dual-stacked-ipv4-ipv6-virtual-hosts\/\",\"url\":\"https:\/\/trysiteprice.com\/blog\/apache-ipv6-configuration-dual-stacked-ipv4-ipv6-virtual-hosts\/\",\"name\":\"Apache IPv6 Configuration: Dual Stacked IPv4 & IPv6 Virtual Hosts - TrySitePrice\",\"isPartOf\":{\"@id\":\"https:\/\/trysiteprice.com\/blog\/#website\"},\"datePublished\":\"2023-02-16T10:04:00+00:00\",\"dateModified\":\"2023-02-16T10:04:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/trysiteprice.com\/blog\/apache-ipv6-configuration-dual-stacked-ipv4-ipv6-virtual-hosts\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/trysiteprice.com\/blog\/apache-ipv6-configuration-dual-stacked-ipv4-ipv6-virtual-hosts\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/trysiteprice.com\/blog\/apache-ipv6-configuration-dual-stacked-ipv4-ipv6-virtual-hosts\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/trysiteprice.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Apache IPv6 Configuration: Dual Stacked IPv4 &#038; IPv6 Virtual Hosts\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/trysiteprice.com\/blog\/#website\",\"url\":\"https:\/\/trysiteprice.com\/blog\/\",\"name\":\"TrySitePrice\",\"description\":\"Free Website Value Calculator Tool\",\"publisher\":{\"@id\":\"https:\/\/trysiteprice.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/trysiteprice.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/trysiteprice.com\/blog\/#organization\",\"name\":\"TrySitePrice\",\"url\":\"https:\/\/trysiteprice.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/trysiteprice.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/trysiteprice.com\/blog\/wp-content\/uploads\/2021\/12\/cropped-trysiteprice-logo.png\",\"contentUrl\":\"https:\/\/trysiteprice.com\/blog\/wp-content\/uploads\/2021\/12\/cropped-trysiteprice-logo.png\",\"width\":395,\"height\":268,\"caption\":\"TrySitePrice\"},\"image\":{\"@id\":\"https:\/\/trysiteprice.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/trysiteprice.com\/blog\/#\/schema\/person\/358e04eeea4281deacad2f30c58e67f4\",\"name\":\"Rahul Sahu\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/trysiteprice.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/51f0f95f7b95665f62baed2211572165?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/51f0f95f7b95665f62baed2211572165?s=96&d=mm&r=g\",\"caption\":\"Rahul Sahu\"},\"sameAs\":[\"https:\/\/trysiteprice.com\/blog\"],\"url\":\"https:\/\/trysiteprice.com\/blog\/author\/rsahu4242_trysiteprice\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Apache IPv6 Configuration: Dual Stacked IPv4 & IPv6 Virtual Hosts - TrySitePrice","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:\/\/trysiteprice.com\/blog\/apache-ipv6-configuration-dual-stacked-ipv4-ipv6-virtual-hosts\/","og_locale":"en_US","og_type":"article","og_title":"Apache IPv6 Configuration: Dual Stacked IPv4 & IPv6 Virtual Hosts - TrySitePrice","og_description":"To configure Apache to serve dual stacked IPv4 and IPv6 virtual hosts, you need to follow these steps: Make sure that your Apache installation supports IPv6. You can check this by running the following command: httpd -V | grep -i ipv6 If IPv6 support is enabled, you will see a line containing --enable-ipv6. Edit the ... Read more","og_url":"https:\/\/trysiteprice.com\/blog\/apache-ipv6-configuration-dual-stacked-ipv4-ipv6-virtual-hosts\/","og_site_name":"TrySitePrice","article_published_time":"2023-02-16T10:04:00+00:00","author":"Rahul Sahu","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/trysiteprice.com\/blog\/apache-ipv6-configuration-dual-stacked-ipv4-ipv6-virtual-hosts\/#article","isPartOf":{"@id":"https:\/\/trysiteprice.com\/blog\/apache-ipv6-configuration-dual-stacked-ipv4-ipv6-virtual-hosts\/"},"author":{"name":"Rahul Sahu","@id":"https:\/\/trysiteprice.com\/blog\/#\/schema\/person\/358e04eeea4281deacad2f30c58e67f4"},"headline":"Apache IPv6 Configuration: Dual Stacked IPv4 &#038; IPv6 Virtual Hosts","datePublished":"2023-02-16T10:04:00+00:00","dateModified":"2023-02-16T10:04:00+00:00","mainEntityOfPage":{"@id":"https:\/\/trysiteprice.com\/blog\/apache-ipv6-configuration-dual-stacked-ipv4-ipv6-virtual-hosts\/"},"wordCount":223,"commentCount":0,"publisher":{"@id":"https:\/\/trysiteprice.com\/blog\/#organization"},"articleSection":["Best\/Tutorial"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/trysiteprice.com\/blog\/apache-ipv6-configuration-dual-stacked-ipv4-ipv6-virtual-hosts\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/trysiteprice.com\/blog\/apache-ipv6-configuration-dual-stacked-ipv4-ipv6-virtual-hosts\/","url":"https:\/\/trysiteprice.com\/blog\/apache-ipv6-configuration-dual-stacked-ipv4-ipv6-virtual-hosts\/","name":"Apache IPv6 Configuration: Dual Stacked IPv4 & IPv6 Virtual Hosts - TrySitePrice","isPartOf":{"@id":"https:\/\/trysiteprice.com\/blog\/#website"},"datePublished":"2023-02-16T10:04:00+00:00","dateModified":"2023-02-16T10:04:00+00:00","breadcrumb":{"@id":"https:\/\/trysiteprice.com\/blog\/apache-ipv6-configuration-dual-stacked-ipv4-ipv6-virtual-hosts\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/trysiteprice.com\/blog\/apache-ipv6-configuration-dual-stacked-ipv4-ipv6-virtual-hosts\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/trysiteprice.com\/blog\/apache-ipv6-configuration-dual-stacked-ipv4-ipv6-virtual-hosts\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/trysiteprice.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Apache IPv6 Configuration: Dual Stacked IPv4 &#038; IPv6 Virtual Hosts"}]},{"@type":"WebSite","@id":"https:\/\/trysiteprice.com\/blog\/#website","url":"https:\/\/trysiteprice.com\/blog\/","name":"TrySitePrice","description":"Free Website Value Calculator Tool","publisher":{"@id":"https:\/\/trysiteprice.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/trysiteprice.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/trysiteprice.com\/blog\/#organization","name":"TrySitePrice","url":"https:\/\/trysiteprice.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/trysiteprice.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/trysiteprice.com\/blog\/wp-content\/uploads\/2021\/12\/cropped-trysiteprice-logo.png","contentUrl":"https:\/\/trysiteprice.com\/blog\/wp-content\/uploads\/2021\/12\/cropped-trysiteprice-logo.png","width":395,"height":268,"caption":"TrySitePrice"},"image":{"@id":"https:\/\/trysiteprice.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/trysiteprice.com\/blog\/#\/schema\/person\/358e04eeea4281deacad2f30c58e67f4","name":"Rahul Sahu","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/trysiteprice.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/51f0f95f7b95665f62baed2211572165?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/51f0f95f7b95665f62baed2211572165?s=96&d=mm&r=g","caption":"Rahul Sahu"},"sameAs":["https:\/\/trysiteprice.com\/blog"],"url":"https:\/\/trysiteprice.com\/blog\/author\/rsahu4242_trysiteprice\/"}]}},"_links":{"self":[{"href":"https:\/\/trysiteprice.com\/blog\/wp-json\/wp\/v2\/posts\/5714","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/trysiteprice.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/trysiteprice.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/trysiteprice.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/trysiteprice.com\/blog\/wp-json\/wp\/v2\/comments?post=5714"}],"version-history":[{"count":1,"href":"https:\/\/trysiteprice.com\/blog\/wp-json\/wp\/v2\/posts\/5714\/revisions"}],"predecessor-version":[{"id":5717,"href":"https:\/\/trysiteprice.com\/blog\/wp-json\/wp\/v2\/posts\/5714\/revisions\/5717"}],"wp:attachment":[{"href":"https:\/\/trysiteprice.com\/blog\/wp-json\/wp\/v2\/media?parent=5714"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trysiteprice.com\/blog\/wp-json\/wp\/v2\/categories?post=5714"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trysiteprice.com\/blog\/wp-json\/wp\/v2\/tags?post=5714"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}