0

I have a Magento 2.1.5 installation running, but it only works if I change my document root to /pub. If I don't, I get a bunch of 404 errors:

The problem is that eventually I'll have to move the installation to a hosting provider where the document root cannot be changed.

Only a folder called _requirejs is created within the static folder. There's no version1492703026 anywhere to be found:

I've tried the following:

  • Modify di.xml as per here
  • (Re)deploy all static content via the command-line
  • Rewrite everything to /pub
  • Restore the .htaccess files within the web root and /pub

Would anybody have any idea what's going on?

Thanks in advance!

0

You have Sign Static Files set to Yes in your configuration.

You can turn it off from admin panel. Go to

Stores -> Configuration -> Advanced -> Developer -> Static Files Settings

Or you can insert into core_config_data table new setting for path = dev/static/sign and value = 0

Then run php bin/magento setup:static-content:deploy and you clear your cache.

0

Please do this process.

  • Remove the folders(Not Files) from var
  • Remove the folders(Not Files) from pub/static
  • Now run this 4 command in this sequence
  • php bin/magento setup:upgrade
  • php bin/magento setup:static-content:deploy
  • php bin/magento indexer:reindex
  • php bin/magento cache:flush

And after that it is not work then please give 777 permission to var and pub folder which are in the root directory.

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.