IPv6 has a performance advantage over IPv4. It can help to decrease the page load time from 25ms to 300ms. An interesting report by SUCURI shows 16% of the top 1000 sites in the world support IPv6 and 7% of the top 1 million sites.
If not already, it would be good to enable on your site. Pre-requisite – you have to ensure IPv6 is enabled on the OS level. If you are using RHEL/CentOS, then you may refer to this guide. Let’s see the procedure to implement IPv6 in Apache HTTP and the Nginx web server.
How to find IPv6 on Linux?
Before enabling the IPv6, you need to know the IPv6 address. There are multiple ways to locate the IPv6 in Linux/CentOS. Using ifconfig You can use ifconfig with grep inet6 to find the address Using IP Show So now you know your server IPv6 address.
Enable IPv6 in Apache HTTP Server
I assume you have installed Apache, and it’s up and running.
Go to the conf folder (default installation location would be /etc/httpd/conf) Take a backup of httpd.conf file Add the Listen directive with the port number
Note: ensure to put IPv6 in the square box.
Restart the Apache HTTP server
And, as you can see the second line starting with tcp6.
Enable IPv6 in Nginx Web Server
By default, Nginx is configured to listen on IPv6 address. If you take a look at the nginx.conf file, you should see the following. If you just have one IPv6 address, then it’s alright; however, if you have multiple and would like Nginx to listen on specific IP, then you need to adjust like this. Restart Nginx to verify it’s listening on specific IP It’s easy, isn’t it?
Update DNS AAAA Record
The last step you need to do is to update the AAAA record of your domain at the registrar. Once updated, you can verify the record by doing a DNS lookup. You may also use the IPv6 Test tool to check if your website is accessible over IPv6 or not.