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
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/connector/pub/
ServerName connector
ServerAlias connector
and also updated the hosts file
Still the website is not loading correctly. enter image description here
getting error when opening the css files
if I remove the version it is showing
Is there any configuration do I missed? Can you please help me on this?
5 Answers 5
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.
-
Thank you for the reply, updated still not working.Bojjaiah– Bojjaiah2022年07月08日 11:46:37 +00:00Commented Jul 8, 2022 at 11:46
-
is it version number there in url?S.P– S.P2022年07月08日 14:56:22 +00:00Commented Jul 8, 2022 at 14:56
-
Yes, the version number exists in the URL.Bojjaiah– Bojjaiah2022年07月09日 04:38:19 +00:00Commented Jul 9, 2022 at 4:38
-
Open your database. and serach "'dev/static/sign" in core_config_data.S.P– S.P2022年07月09日 07:15:09 +00:00Commented Jul 9, 2022 at 7:15
-
if you find that value replace it with 0.S.P– S.P2022年07月09日 07:15:33 +00:00Commented Jul 9, 2022 at 7:15
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
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/
-
Thank you for the reply, updated still not working.Bojjaiah– Bojjaiah2022年07月08日 11:46:43 +00:00Commented Jul 8, 2022 at 11:46
I Followed the Magento Dev Docs steps, it's worked for me.
Please let me if any issues, if not worked.
Use these command. sudo chmod -R 777 var generated/ pub/static pub/media
sudo chmod -R 777 .
http://connector/static.php?resource=/frontend/Magento/luma/en_US/css/print.css(see pub/static/.htaccess line #12)