Fix multi-domain certificate path handling and update nginx to 1.30#145
Open
kings9527 wants to merge 1 commit into
Open
Fix multi-domain certificate path handling and update nginx to 1.30#145kings9527 wants to merge 1 commit into
kings9527 wants to merge 1 commit into
Conversation
…version - Use first domain (domains[0]) as certificate directory name instead of unquoted array expansion, which caused incorrect path resolution when multiple domains were configured - Check specific certbot live directory instead of generic data_path for existing certificate detection - Update nginx image from 1.15-alpine (2018, EOL) to 1.30-alpine (2026 stable) for security patches and HTTP/2 keep-alive improvements Fixes wmnnd#139
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
When multiple domains are configured in the
domainsarray, the script uses unquoted$domainsin path operations (e.g.,rm -Rf /etc/letsencrypt/live/$domains), which causes bash to expand the array into multiple arguments. This leads to:/etc/letsencrypt/live/example.org www.example.orginstead of/etc/letsencrypt/live/example.orgrm -Rf /etc/letsencrypt/archive/$domainsattempt to delete paths that don't exist or may match unintended targets$data_path(always exists after first run) instead of the actual certificate directoryChanges
init-letsencrypt.sh
${domains[0]}as the certificate directory name (Certbot uses the first domain for the live directory)$data_path/conf/live/$cert_dirfor existing certificate detectiondocker-compose.yml
1.15-alpine(2018, EOL, vulnerable) to1.30-alpine(2026 stable, includes HTTP/2 keep-alive improvements)Related
Testing
bash -n