0

I just installed the Magento 2.4.4 successfully and it's showing the website in the browser, but not loading the js and css files.

However, I set the root file to pub folder and updated the .conf file as below

enter image description here

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/connector/pub/
ServerName connector
ServerAlias connector

and also updated the hosts file

enter image description here

Still the website is not loading correctly. enter image description here

getting error when opening the css files

enter image description here

if I remove the version it is showing

enter image description here

Is there any configuration do I missed? Can you please help me on this?

6
  • Disabling 'dev/static/sign' will temporarily fix your issue but not solve the problem. Are you using Apache or Nginx? Commented Jun 30, 2022 at 14:43
  • @MagePalExtensions Apache.
    – Bojjaiah
    Commented Jun 30, 2022 at 15:52
  • Check to see if mod_rewrite is enabled. See stackoverflow.com/questions/7337724/… Commented Jun 30, 2022 at 15:58
  • 1
    Make sure pub/static.php exist... then try http://connector/static.php?resource=/frontend/Magento/luma/en_US/css/print.css (see pub/static/.htaccess line #12) Commented Jun 30, 2022 at 16:15
  • @MagePalExtensions let me check
    – Bojjaiah
    Commented Jun 30, 2022 at 16:36

5 Answers 5

1

I have got same issue in nginx server, Still i am unable to find out exact issue.

I had figure out it with temperately solution.

change value of dev/static/sign to 0 form core_config_data table.

check with below update

UPDATE `core_config_data` SET `value` = '0' WHERE `path` = 'dev/static/sign';

after execute below commands.

php bin/magento setup:static-content:deploy -f;
php bin/magento cache:clean;

and set proper permission.

7
  • Thank you for the reply, updated still not working.
    – Bojjaiah
    Commented Jul 8, 2022 at 11:46
  • is it version number there in url?
    – S.P
    Commented Jul 8, 2022 at 14:56
  • Yes, the version number exists in the URL.
    – Bojjaiah
    Commented Jul 9, 2022 at 4:38
  • Open your database. and serach "'dev/static/sign" in core_config_data.
    – S.P
    Commented Jul 9, 2022 at 7:15
  • if you find that value replace it with 0.
    – S.P
    Commented Jul 9, 2022 at 7:15
1

please open your database, core_config_data table and then run following query into this.

insert into core_config_data (config_id, scope, scope_id, path, value) values (null, 'default', 0, 'dev/static/sign', 0);

After run the above query please run following command in your Magento root

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento indexer:reindex
php bin/magento cache:flush
0

Try to run the following commands.

php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento indexer:reindex
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
sudo chmod -R 777 var/ generated/ pub/
1
  • Thank you for the reply, updated still not working.
    – Bojjaiah
    Commented Jul 8, 2022 at 11:46
0

I Followed the Magento Dev Docs steps, it's worked for me.

Please let me if any issues, if not worked.

0

Use these command. sudo chmod -R 777 var generated/ pub/static pub/media

sudo chmod -R 777 .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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