I had migrated a Magento 2.3.5 site from one nginx 1.14.2 server to another nginx 1.20.1 server
I have set up the nginx conf as per the nginx.conf.sample.
Everything works fine except the home page. The home page is not working because the CSS and JS files included in <head> has /pub/ in them leading to those file giving 404 error.
All other pages do not have /pub/ in the CSS and JS file inclusions in <head> so they all work fine.
Even the CMS page for home page when loaded individually like "domain.com/homepage" works fine. But when it loads as home page /pub/ in getting included leading to the home page being broken.
I have spent days trying to find a solution but without success. Any help is appreciated.
Thanks for your time.