Apache web server is listening on ipv6 type

11,772

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

Listen 80

If you want to restrict it IPv4 only, change the setting to

Listen 0.0.0.0:80

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.

Share:
11,772

Related videos on Youtube

bgv
Author by

bgv

Updated on September 18, 2022

Comments

  • bgv
    bgv over 1 year

    I installed an application in HP server that itself installs apache 2.4 web server.I gave ipv4 address to this application.

    But I checked the status of this service in the server.I found that apache web server is listening by ipv6 type and on ports 80 and 443.

    I fail to understand whether any problem occurs as application has ipv4 ip and service is listening by ipv6.

    Server has RHEL 6.5

  • Michael Hampton
    Michael Hampton over 7 years
    You can but you really should not.
  • bgtvfr
    bgtvfr over 7 years
    Why? ipv6 sucks and has been implemented by brainless people. Every single computer works really well without ipv6. varnish-cache.org/docs/trunk/phk/ipv6suckage.html
  • Michael Hampton
    Michael Hampton over 7 years
    Really? Those are truly minor issues. And no, every single computer does NOT work well without IPv6. Some people can't even get on the Internet without it. Don't blindly trust everything you read on some guy's web site.
  • bgtvfr
    bgtvfr over 7 years
    I trust this guy more than you : you really don't have the same level at all.
  • Michael Hampton
    Michael Hampton over 7 years
    Of course everything he says is true. You have just vastly overestimated its importance. You still have a lot to learn.
  • bgtvfr
    bgtvfr over 7 years
    I live without TV, without windows, without eating meat, without car, without smartphone, and without ipv6. Stop useless overbloated way of life.
  • SBO
    SBO over 7 years
    PHK may be a famous dev, it doesn't mean that whatever he says/writes is pure gold and has to be taken as granted. Like it or not, IPv6 is growing slowly, and you'll have to deal with it sooner or later. Deactivating it is, IMHO, a dumb move.
  • bgtvfr
    bgtvfr over 7 years
    We'll have to deal with ipv6 in ten+ years. All servers will be reinstalled until this time. ipv6 will only begin with end-users whose ISP have 6to4 gateway. There even exist some computers without ipv4 and without ipv6, because of security concerns.