Fix nginx routing: 127.0.0.1 instead of host.docker.internal - #25
Open
gi-os wants to merge 1 commit into
Open
Conversation
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
nginx.jswas generating shop location blocks usinghost.docker.internalas the upstream host. This hostname only resolves inside Docker containers — it is NOT resolvable by the host nginx process, causing nginx to fail its config test and refuse to reload, making new shops unreachable.Also fixed: routing pattern now uses
location /slug/(trailing slash, no rewrite rules) matching the standard pattern used by demox, demoxi, edition, michael-kors. The old rewrite approach stripped the basePath prefix before passing to Next.js, breaking asset loading.Fix
proxy_pass http://127.0.0.1:${port}— resolves from hostlocation /${slug}/— trailing slash, no rewrite, passes full path to Next.jsreloadNginx()now callsnginx -t && systemctl reload nginxdirectly instead ofdocker exec nginx-proxyAffected shops
demo12 was the first shop created with the broken generator. Fixed manually on server.