0

After installing Magento 2.3 on the server, when I run the URL I am receiving 404 for pub/static.

I have given proper permission to magento folders. Also set ownership to apache for the codebase.

Now, while looking into pub/static folder, I found the user & group is set to root instead of apache. Is this causing issue to load the static content in Magento? If so, how can I set the ownership of newly created folders?

Please advise.

0

Kindly run below commands and check again

php bin/magento setup:upgrade

php bin/magento setup:static-content:deploy -f
  • Hi Suresh, Thanks but I have tried running above commands but still receiving 404. – user72530 Jan 24 at 20:16
  • Check pub folder .htaccess file. – Suresh Chikani Jan 24 at 20:23
0
  1. In app/etc/di.xml, name="view_preprocessed" section, update :

    Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink

    to

    Magento\Framework\App\View\Asset\MaterializationStrategy\Copy .

  2. Remove the content of pub/static = rm -rf pub/static/* and var/view_preprocessed = rm -rf var/view_preprocessed/*

  3. Set them (pub/static, var/view_preprocessed) the ownership as www-data with chmod 775

  4. Flush the cache : php bin/magento c:f

  5. Deploy the static-content : php bin/magento setup:static-content:deploy -f

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.