UPWORK superadmin blog

Tips and Tricks for clients

Disabling listening IPv6 in config file of Apache2 server

without comments

By default, Apache will listen on all IPs, both IPv6 and IPv4.
This is controlled by the Listen directive:

root@localhost ~ # egrep -r Listen /etc/apache2
/etc/apache2/ports.conf:Listen 80
root@localhost ~ # 

To turn off IPv6 in Apache, just change the Listen directive to:


This will limit Apache to listening only to IPv4 connections. Repeat this for port 443 if you want to stop Apache from listening for HTTPS on IPv6.

Written by spectre

June 27th, 2013 at 1:29 pm

Leave a Reply