Thanks for any help.

The standard theme looks fine with this new installation (Windows / Nginx) on the first page load only. I can reliably duplicate the issue by clearing the pub/static folder, where the page loads fine once, and then is no assets again.

One of the odd things is, when I try the assets links like css and js in the source of the bad page, they all link just fine. There are no broken links. Console is clean. The page source code is identical. I've checked the version in source is the same as deployed_version.txt and they are. Content is being generated in pub\static\frontend\Magento\blank\en_US due to also trying:

Changing view_preprocessed from Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink to Magento\Framework\App\View\Asset\MaterializationStrategy\Copy and back again with no luck.

I have also tried:

  • Clearing var and pub/static folders, keeping .htaccess files.
  • Running php bin/magento setup:upgrade
  • Running php bin/magento setup:di:compile
  • Running php bin/magento setup:static-content:deploy en_US -f
  • Running all cache cleaning and flushing.

The only thing that does work, is clearing pub/static files. An example on a smaller scale:

On first page load this image renders, when it does not exist in the pub/static folder: http://magento.local/static/version1626188186/frontend/Magento/blank/en_US/images/logo.svg

File is generated at this time at: pub\static\frontend\Magento\blank\en_US\images\logo.svg

On page reload, image is broken, but if I try the direct URL of what's above, it is fine! Yet it will not load on the page.

  • I have also run the following with no help: icacls C:\nginx\html\pub\static\frontend\Magento\blank\en_US\images\logo.svg /grant:r "Administrator":F /T /inheritance:r /Q
    – JasonM
    Jul 13, 2021 at 15:56

1 Answer 1


Ok I fixed it. Turns out, the issue of css being sent as "text/plain" wasn't showing in Chrome, but it was in Firefox. After I see that, I added the following line:

include /nginx/conf/mime.types;


location /static/ {

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.