Apache
How to Disable IPv6 in Apache Server
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 (ports.conf):
Listen 80
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.