Re-enable IPv4 connections in Nginx no-default.conf #885
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Multiple listen directives
It appears Ubuntu doesn't support dual-stack sockets (single socket serving both IPv4 and IPv6), even with
ipv6only=offparameter forlisten. Separate listen directives are necessary forno-default.confto serve IPv4 and IPv6 connections to unknown hosts. Discussion at h5bp/server-configs-nginx#179 (comment).deferred parameter
This PR also adds the
deferredparameter to enable deferredaccept()(theTCP_DEFER_ACCEPTsocket option) to streamline usage of server processes. Here is the best description I found.Note that
deferredis one of the "additional parameters ... [that can be applied] only once for a givenaddress:portpair" (Nginx docs). For this reason it should be applied only in theno-default.conf. Ifdeferredwere also applied for WordPress vhosts, Nginx would fail to reload:nginx: [emerg] duplicate listen options forsocket (example discussion).Testing IPv6
Of course, to test IPv6, one's local machine and server must both enable IPv6. For Trellis to make IPv6 SSH connections (e.g., to run a playbook), adjust the ListenAdresses and AddressFamily:
ip6tablessettings.