How to Disable IPv6 in Apache Server

If there is no reason to run Apache with IPv6 then disabling it is wasy. We need to make quick changes to the Listen directive.

By default, Apache will listen on all IPs, both IPv6 and IPv4. (Assuming your system has IPv6 support). This is controlled by the Listen directive:

Listen 80

Turn off IPv6 in Apache

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

Listen 0.0.0.0:80

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

Trackback URI | Comments RSS

Leave a Reply

You must be logged in to post a comment.