cancel
Showing results for 
Search instead for 
Did you mean: 

JS and font not loading 404 error

JS and font not loading 404 error

Hello,

In my Magento 2.2.5 store there is JS and fonts 4040 error.

I am using centos with lamp and webserver user and group name is daemon

I have run below commands but still issue exist.

 

alias mage="/opt/lampp/bin/php -d memory_limit=-1 bin/magento"

sudo find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +
sudo find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +
sudo chown -R :daemon .
sudo chmod u+x bin/magento

mage s:s:d
mage c:c
mage c:f
2 REPLIES 2

Re: JS and font not loading 404 error

@ishaqdahot ,

try the following steps : 

  • disable sign static files 
    bin/magento config:show dev/static/sign 0
  • check .htaccess file in pub/static folder
  • try 755 permission for pub/static folder 
    bin/magento config:show dev/static/sign

kindly Accept as a Solution if this works for you and give Kudos Smiley Happy 

Re: JS and font not loading 404 error

@amitsamsukha 

 

Below commands resolved my issue basically I pu en_GB in mage s:s:d en_GB and it solved the issue.

Below is the list of commands

 

rm -rf var/view_preprocessed/* pub/static/*
sudo chmod -R 777 var pub
mage s:s:d en_GB
mage c:c
mage c:f