File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed
Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -58,9 +58,22 @@ cat /usr/share/nginx/html/runtime-config.js
5858echo " � File permissions after writing:"
5959ls -la /usr/share/nginx/html/runtime-config.js
6060
61- # DEBUG: Test file can be read by nginx user
62- echo " 🔍 Testing nginx config:"
63- nginx -t 2> /dev/null && echo " ✅ Nginx config valid" || echo " ❌ Nginx config error"
61+ # DEBUG: Test nginx config and capture detailed stderr so App Service logs show
62+ # the precise error (helpful when nginx silently fails at startup in the platform).
63+ echo " 🔍 Testing nginx config (detailed output will be saved to /tmp/nginx-test.log):"
64+ # Run nginx -t and capture stderr to a file we can print; preserve exit code
65+ nginx -t 2> /tmp/nginx-test.log || true
66+ echo " --- nginx -t stderr (/tmp/nginx-test.log) ---"
67+ if [ -s /tmp/nginx-test.log ]; then
68+ sed -n ' 1,200p' /tmp/nginx-test.log || true
69+ else
70+ echo " (no nginx test output)"
71+ fi
72+ if nginx -t > /dev/null 2>&1 ; then
73+ echo " ✅ Nginx config valid"
74+ else
75+ echo " ❌ Nginx config error (see /tmp/nginx-test.log above)"
76+ fi
6477
6578# CRITICAL: Verify the VITE_NODE_ENV was written correctly
6679echo " 🔍 CRITICAL CHECK - Verifying VITE_NODE_ENV in file:"
You can’t perform that action at this time.
0 commit comments