Zend certified PHP/Magento developer

Resources in /pub/static/ is inaccessible after migration and domain change

I moved a Magento2 install to a new host, and changed the domain.

  • Ensured Apache2 AllowOverride is enabled
  • Updated references in the database core_config_data table
  • Flushed cache Ran: magento setup:static-content:deploy

The site loads fine, but images, css and js files from /pub/static/ are not loading.

Error: “The resource from … was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff)”

Accessing the resources directly gives a 404. The resources are definitely in /pub/static/ at the path which 404s.

Resources in /pub/media load OK.