Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

To enable IPv6 for a website in Nginx or Apache, configure an IPv6 listener for each port the site serves—usually TCP 80 for HTTP and TCP 443 for HTTPS—then make sure the hostname, IPv6 address, route, and firewall all support access. Write IPv6 literals in square brackets, validate the configuration before reloading, and test both the listening socket and an IPv6 request.

Before changing the web-server configuration

A web server can bind to an IPv6 socket while the site remains unreachable from the internet. Treat IPv6 as an end-to-end path: the server needs a routable IPv6 address and route, its firewall and any cloud or edge firewall must permit the traffic, DNS needs an AAAA record for the hostname, and the correct virtual host must answer the request.

  • Check that an IPv6 address is assigned to the server with ip -6 addr.
  • Check for a default IPv6 route with ip -6 route.
  • Decide which ports should accept IPv6. Most sites need TCP 80 and TCP 443; add only the ports your service actually uses.
  • Make sure the hostname’s AAAA record points to the server’s routable IPv6 address.
  • Allow the required TCP ports in both the host firewall and any cloud, hosting, or edge firewall.

Firewall commands and cloud controls depend on the operating system and provider. The Nginx and Apache listener directives bind sockets; they do not create an IPv6 route, publish DNS, or open a firewall.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Enable IPv6 in Nginx

Nginx uses the listen directive. Put the IPv6 address in square brackets, as in listen [::]:80;. The same pattern works for HTTPS on port 443. Nginx’s documentation describes bracketed IPv6 listener syntax and the ipv6only socket option in its listen directive reference and HTTP core module documentation.

#1 Best Overall
Klein Tools VDV526-200 LAN Scout Jr Cable Tester Ethernet Cable Tester Kit
  • VERSATILE CABLE TESTING: Cable tester for data (RJ45) terminated cables and patch cords, ensuring comprehensive testing capabilities
  • LARGE BACKLIT LCD: Backlit LCD display enables easy reading of pin-to-pin wiremap results, even in low-lit areas
  • COMPREHENSIVE FAULT DETECTION: Test for Open, Short, Miswire, Split-Pair faults, Cross-over, and Shield, providing thorough fault detection
  • INTUITIVE USER INTERFACE: User-friendly interface with three buttons and simple, easy-to-identify test responses, ensuring a smooth testing experience
  • MULTIPLE TONE GENERATOR STYLES: Tone on a single wire, wire pair, or all 8 conductor wires using the multiple style tone generator (solid/warble); requires probe Cat. No. VDV500-123 (sold separately)

HTTP on port 80

For a server intended to accept both IPv4 and IPv6 connections, configure both listeners in the same server block:

server {
    listen 0.0.0.0:80;
    listen [::]:80;
    server_name example.com www.example.com;
    root /var/www/example;
}

Replace the example hostnames and document root with the values for your site. Keep the IPv6 listener in the server block that has the intended server_name; adding a listener to a different block can make the request select the wrong site.

HTTPS on port 443

Add an IPv6 listener to the TLS server block as well as the IPv4 listener. Use the certificate and key paths installed for your deployment:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
server {
    listen 0.0.0.0:443 ssl;
    listen [::]:443 ssl;
    server_name example.com www.example.com;

    ssl_certificate     /etc/letsencrypt/live/example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
}

Having IPv6 on port 80 does not enable it on 443, or vice versa. Configure each service port separately.

Rank #2
Klein Tools VDV501-851 Scout Pro 3 Tester Starter Set Cable Tester
  • VERSATILE CABLE TESTING: Cable tester tests voice (RJ11/12), data (RJ45), and video (coax F-connector) terminated cables, providing clear results for comprehensive testing on unenergized Ethernet cables (not designed to test PoE)
  • EXTENDED CABLE LENGTH MEASUREMENT: Measure cable length up to 2000 feet (610 m), allowing for precise cable length determination
  • COMPREHENSIVE FAULT DETECTION: Test for Open, Short, Miswire, or Split-Pair faults, ensuring thorough fault detection and identification
  • BACKLIT LCD DISPLAY: Backlit LCD screen displays cable length, wiremap, cable ID, and test results, ensuring easy readability in various lighting conditions
  • EFFICIENT CABLE TRACING: Trace cables, wire pairs, and individual conductor wires using the multiple style tone generator (requires analog probe Cat. No. VDV500-123, sold separately), simplifying cable tracing tasks

Choose IPv6-only or IPv4-mapped socket behavior deliberately

You can explicitly request an IPv6-only wildcard socket with listen [::]:80 ipv6only=on;. Nginx documents ipv6only as controlling whether an IPv6 wildcard socket also accepts IPv4-mapped connections. Set ipv6only=off only when you understand how that behavior interacts with the host’s other listeners. Nginx documents this as a per-address-and-port startup setting, so do not treat it as a harmless cosmetic option.

Validate, reload, and test Nginx

  1. Check syntax: sudo nginx -t. Continue only if the test reports that the configuration is successful.
  2. Reload Nginx without stopping it: sudo systemctl reload nginx.
  3. Confirm IPv6 listeners exist for the intended ports: sudo ss -lnt6 '( sport = :80 or sport = :443 )'.
  4. Make an IPv6 HTTPS request to the hostname: curl -6 -I https://example.com/. For an HTTP-only site, use curl -6 -I http://example.com/.

Enable IPv6 in Apache

Apache’s global Listen directive accepts a port or an address-and-port pair. Enclose IPv6 literals in square brackets; Apache’s example form is Listen [2001:db8::a00:20ff:fea7:ccea]:80. See the Apache binding documentation and Listen directive reference.

Add global IPv4 and IPv6 listeners

For a server accepting HTTP and HTTPS over both protocols, the global listener configuration can include:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Listen 0.0.0.0:80
Listen [::]:80
Listen 0.0.0.0:443
Listen [::]:443

Do not add duplicate or overlapping Listen declarations already present in included configuration files. Conflicting listener declarations can prevent Apache from starting; a port already bound by another process can also produce an “Address already in use” failure.

Rank #3
NOYAFA NF-8508 Network Cable Tester with Optical Power Meter
  • Multifunctional NOYAFA NF-8508 Network Cable Tester: There are nine features to meet your needs. Continuity Testing, Cable Scan, Port Flash, Length Measurement, POE Power Supply Test, QC testing, Optical Power Meter, VFL and NVC function.It is perfectly suited for various engineering cabling projects, network troubleshooting, network equipment maintenance and testing scenarios. Its precise cable scanning and fault localization capabilities help you effortlessly pinpoint the root cause of issues.
  • 7 WAVELENGTHS OPTICAL POWER METER: NF-8508 network cable tester can measure 7 standard wavelengths, 850/1300/1310/1490/1550/1625/1650, power detecting range(dBm): -70 ~ +10. Its power detection range spans from -70 dBm to +10 dBm, supporting FC/SC/ST connectors. It enables precise fiber optic power measurement, helping users efficiently assess fiber signal strength and ensure healthy fiber link operation. It effortlessly detects attenuation issues within fibers, thereby safeguarding fiber network stability.
  • High Efficiency Visual Fault Locator: Easy identification of fiber breakpoints, poor connections, bending or cracking. Excellent for finding the right fiber to splice or quickly finding a break. Emmiting Energy: standard wavelenth: 650nm. Fast flashing, slow flashing, high precison.The built-in self-calibration ensures stable long-term performance, and Class IIIa laser (output<5mW) ensures safe daily operation.
  • PORT FLASHING:The indicator light on the connection port in the NF-8508 device flashes to help accurately locate the cable. Displays port information, including operating speed, duplex mode, and negotiation settings. Port lights flash on the same screen to show the port's operating speed, making it easy to pinpoint lines and ports.
  • PoE Testing and Cable Length Test: PoE testing can check cable mapping polarity and voltage of PoE network switches, withstand 60VDC. Automatically detects and switches between 10M/100M/1000M modes, Includes cable tracking, short circuit test, interruption of circuit test and etc The RJ45 cable tester can quickly measure the length of the cable with a range of 200m. Not only network cables, but also phone lines and BNC cables.

Match name-based virtual hosts to the IPv6 listener

Define a virtual host with the intended hostname on the IPv6 address and port. For example:

<VirtualHost *:80>
    ServerName example.com
    DocumentRoot /var/www/example
</VirtualHost>

<VirtualHost [::]:80>
    ServerName example.com
    DocumentRoot /var/www/example
</VirtualHost>

For TLS, configure the corresponding port-443 virtual hosts and include the certificate directives used by your Apache deployment. Keep the IPv6 virtual host’s ServerName aligned with the hostname in DNS and in the request. Apache’s binding behavior for separate IPv4 and IPv6 sockets can depend on platform support and build options.

Validate, reload, and test Apache

  1. Check the configuration: sudo apachectl configtest. Fix any reported syntax error before proceeding.
  2. Reload the service. On Debian or Ubuntu systems the unit is commonly named apache2: sudo systemctl reload apache2. Other distributions may use a different service name.
  3. Confirm IPv6 listeners: sudo ss -lnt6 '( sport = :80 or sport = :443 )'.
  4. Test the hostname over IPv6: curl -6 -I https://example.com/, or use http:// if only port 80 is configured.

How Nginx and Apache differ for IPv6

Concern Nginx Apache
Listener directive listen [::]:80; in a server block. Listen [::]:80 in global configuration.
Virtual-host selection Put the IPv6 listener in the server block with the intended server_name. Configure a virtual host for the IPv6 address and port with the intended ServerName.
IPv4-mapped behavior The ipv6only socket option controls whether a wildcard IPv6 socket accepts IPv4-mapped connections. Separate IPv4/IPv6 socket behavior depends on platform support and build options.
Syntax test and reload sudo nginx -t, then sudo systemctl reload nginx. sudo apachectl configtest, then reload the service (commonly apache2 on Debian/Ubuntu).

Diagnose an IPv6 site that times out or serves the wrong page

The IPv6 socket is missing

Inspect listeners with sudo ss -lnt6 '( sport = :80 or sport = :443 )'. If the expected port is absent, check that the IPv6 listener is in the active configuration, the syntax test passes, and the service reloaded successfully. For Apache, also look for duplicate or conflicting Listen declarations.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The socket exists, but requests time out

A listening socket confirms only that the service bound locally. Check ip -6 addr for the intended address and ip -6 route for a route, then verify that TCP 80 or 443 is permitted through the host and upstream firewalls. A private or unrouted address is not reachable from the public internet.

Rank #4
Sale
iMBAPrice - RJ45 Network Cable Tester for Lan Phone RJ45/RJ11/RJ12/CAT5/CAT6/CAT7 UTP Wire Test Tool
  • Automatically runs all tests and checks for continuity, open, shorted and crossed wire pairs. Visible LED status display.
  • Cable state testing (2-wire): Line DC detecting, anode and cathode determination,Ringing signal detecting open, short and cross circuit testing
  • Cable Type: RJ11 Telephone cable and RJ45 LAN cable
  • Connectors: Ethernet Cat 5, Ethernet Cat 5e, Ethernet Cat 6, Ethernet Cat 7, RJ11 6P and RJ45 8P
  • Power Source: DC9V Battery Required (not included)

The IP works but the hostname does not

Compare a request to the literal address with one to the hostname:

curl -6 -I 'http://[2001:db8::1]/'
curl -6 -I https://example.com/

The first command tests a literal IPv6 destination; the brackets are required in a URL. The address 2001:db8::1 is an example and must be replaced with your server’s actual IPv6 address. If the literal request succeeds but the hostname request fails, inspect the hostname’s AAAA record and the virtual host’s server_name or ServerName.

The wrong site responds

Confirm that the IPv6 listener and the hostname’s virtual-host configuration belong to the same selection path. Check the requested hostname, the server’s configured names, and whether another default server or virtual host is handling unmatched requests.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Configuration test or reload fails

  • Nginx reports an error: run sudo nginx -t and correct the file and line it reports before reloading.
  • Apache reports a syntax error: run sudo apachectl configtest and fix the indicated configuration.
  • “Address already in use”: check for duplicate or overlapping Apache Listen entries and for another process already bound to the port.
  • Reload fails despite a passing syntax test: inspect the service’s system log and status for a bind or runtime error; a syntax check does not guarantee that the operating system will allow the socket to bind.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If your task is to capture a page rather than configure its web server, ScreenshotNeo can return a screenshot from one GET request. Its API accepts a URL and can return PNG, JPEG, WebP, or PDF. See the ScreenshotNeo documentation.

Best Value
Network Ethernet Cable Tester for LAN RJ45 RJ11 CAT5 CAT5E CAT6 CAT6A CAT7, Ethernet Wire Tester Tool UTP/STP Continuity Test for Telephone Line Finder Home Repair (HT812A)
  • Multi-Function Network Cable Tester: Supports RJ45 (CAT5, CAT5e, CAT6, CAT6A, CAT7) and RJ11 telephone cables. Quickly detects continuity, short circuits, open wires, miswiring, and cable shielding status, ensuring your LAN or phone lines are correctly wired and ready to use.
  • Fast/Slow Mode with LED Indicators: Switch between fast and slow scan speeds to identify wiring issues more precisely. LED lights on both master and remote units show wire order, making it easy to spot errors like open pairs or misaligned pins at a glance.
  • Split-Type Design for Long-Distance Testing: Master and remote units can be detached and used separately, allowing you to test both ends of a long cable run, ideal for wall-mounted ports, long runs, or structured cabling. Perfect for home, office, or professional IT setups.
  • Compact, Lightweight & Durable: Ergonomically designed with sturdy ABS housing, this pocket-sized tester is ideal for on-the-go network engineers, DIYers, and electricians. It’s your go-to toolkit for cable maintenance, upgrades, or new installations.
  • Safe & Easy to Use: Simple one-button operation makes testing quick and hassle-free. LED indicators clearly show wiring status, while the G light instantly identifies shielded (FTP/STP) or unshielded (UTP) cables. Supports safe testing of telephone lines with typical voltages under 48-72V, ideal for both home and professional use.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

Cookie banners are accepted and removed before capture, along with supported consent-platform banners, newsletter popups, and chat widgets; those steps can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and response headers report the page verdict and billing status. Its MCP server provides screenshot tools for AI agents, including Claude, Cursor, and other MCP clients. The free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots. ScreenshotNeo is made by Yorker Media; visit ScreenshotNeo for details. Sign up free for 1,000 screenshots a month, with no card required.

Frequently Asked Questions

Do IPv4 and IPv6 need separate listener lines?

Use explicit IPv4 and IPv6 listeners when you want predictable, separate bindings; behavior for IPv4-mapped connections depends on the server and platform.

Can I enable IPv6 only for HTTPS?

Yes. Configure the IPv6 listener on port 443 and ensure DNS, routing, and firewall policy support it; port 80 is a separate listener.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Does adding an AAAA record enable IPv6 by itself?

No. DNS must point to a routable server address, and the server, route, firewall, and matching virtual host must all be ready.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.