Nginx returns blank page for test website on test server, but working fine on dev server/website with exact same configuration

Viewed 88

I am using nginx, and configured both servers same, one is dev server which works fine, and other server i.e. test server giving blank page response. Below is comparison of both files , enter image description here

Also, logs from DEV server where website is reaching fine as below,

114.143.155.38 - - [25/Feb/2022:09:35:19 +0000] "GET / HTTP/1.1" 200 1287 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.109 Safari/537.36" "-"
114.143.155.38 - - [25/Feb/2022:09:35:20 +0000] "GET /static/js/main.90388e31.chunk.js HTTP/1.1" 200 14591 "https://snapdev.XXX.net/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.109 Safari/537.36" "-"
114.143.155.38 - - [25/Feb/2022:09:35:22 +0000] "GET /static/js/2.715b5ed9.chunk.js HTTP/1.1" 200 219801 "https://snapdev.XXXX.net/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.109 Safari/537.36" "-"
114.143.155.38 - - [25/Feb/2022:09:35:24 +0000] "GET /favicon.ico HTTP/1.1" 200 3676 "https://snapdev.XXXX.net/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.109 Safari/537.36" "-"
114.143.155.38 - - [25/Feb/2022:09:35:24 +0000] "GET /api/constants HTTP/1.1" 200 1507 "https://snapdev.XXXX.net/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.109 Safari/537.36" "-"

And logs from Test nginx where blank page is coming as below,

114.143.155.38 - - [25/Feb/2022:09:41:15 +0000] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.109 Safari/537.36" "-"

Please help me to identify , why one server returning DIST folder correctly and why other is failing to reach there.

1 Answers

It is resolved now. It was a problem with my settings.json of the backend code. The hostname for this second UI was wrong. So when I changed the settings.json with the correct name and restarted the backend exe, the 2nd website started working fine.

Related