By default, IPv6 is disabled in Apache web server. IPv6 offers better speed and performance over IPv4. So it is advisable to enable IPv6 for your website. Here is how to enable IPv6 in Apache web server.
How to Enable IPv6 in Apache Web Server
Here are the steps to configure IPv6 in Apache web server.
1. Find out IPv6
Before you enable IPv6, it is important to find out the IPv6 address of your Linux system. You can do this using ipconfig & grep command.
# ifconfig |grep inet6
prefixlen 64 scopeid 0x0<global>
inet6 ::1 prefixlen 128 scopeid 0x10<host>
In the above output, your IPv6 address is the string between inet6 and prefixlen, that is, 2001:0db8:85a3:0000:0000:8a2e:0370:7334
Also read : How to Upgrade Django Version
2. Enable IPv6 in Apache
Open Apache configuration file
# sudo vi /etc/httpd/conf/httpd.conf
Add Listen directive, along with the IPv6 address of your Linux system.
Also Read : How to Clone Git Repository in Ubuntu
3. Restart Apache Server
Restart Apache web server
# sudo service httpd restart
Also Read : How to Upgrade Python in Ubuntu
4. Verify IPv6 in Apache
Run the netstat command to verify that IPv6 is enabled in Apache.
# netstat -anlp |grep 80...
tcp6 0 0 2001:0db8:85a3:0000:0000:8a2e:0370:7334:80 :::* LISTEN 23047/httpd...
You should see the second line starting with tcp6 and mentioning your IPv6 address.
Also read : VPS vs Shared Hosting – In-Depth Comparison
5. Update DNS AAAA record
Finally, you need to update the AAAA record of your domain in your domain registrar. Once it is updated, you can verify it using an IPv6 testing tool.
Also read : How to Install Virtualenv in Ubuntu