IPv6 is the latest Internet Protocol that improve website speed and performance by improving network connectivity and routing. It also provides better security to your website. However, it is disabled by default on Apache web server. Let’s take a look at how to enable IPv6 in Apache for your website.
How to Enable IPv6 in Apache
Here are the steps to enable IPv6 in Apache web server.
1. Open Apache config file
Open Apache config file in a text editor. You will find it at one of the following locations:
$ sudo vim /etc/apache2/httpd.conf
2. Enable IPv6
Add the following line to your Apache config file to enable IPv6, along with the port number 80 for http requests.
Ensure that there are square braces [ ] in listen directive.
3. Restart Apache web server
Restart Apache web server to apply changes
$ sudo /etc/init.d/apache2 start [Debian or Ubuntu] # sudo apachectl restart [RHEL, CentOS or Fedora]
4. Test IPv6
To test if your server port listens to IPv6, just run the netstat command in terminal
# netstat -anlp |grep 80 tcp 0 0 220.127.116.11:80 0.0.0.0:* LISTEN 23047/httpd tcp6 0 0 2400:6180:0:d0::1f33:80 :::* LISTEN 23047/httpd
That’s it! Now Apache will serve through IPv6 protocol and you should see better website performance.