cancel
Showing results for 
Search instead for 
Did you mean: 

Home page can't show properly.

Home page can't show properly.

Hello.

When I want to browse my site then the home page can't showing properly.  The Apache logs show me:

# cat /var/log/httpd/access_log 
10.0.2.2 - - [29/May/2019:02:59:03 -0400] "GET / HTTP/1.1" 200 24588 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
10.0.2.2 - - [29/May/2019:02:59:03 -0400] "GET /pub/static/version1559030185/frontend/Magento/luma/en_US/mage/calendar.css HTTP/1.1" 404 272 "http://127.0.0.1:1338/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
10.0.2.2 - - [29/May/2019:02:59:03 -0400] "GET /pub/static/version1559030185/frontend/Magento/luma/en_US/css/styles-m.css HTTP/1.1" 404 271 "http://127.0.0.1:1338/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
10.0.2.2 - - [29/May/2019:02:59:03 -0400] "GET /pub/static/version1559030185/frontend/Magento/luma/en_US/css/styles-l.css HTTP/1.1" 404 271 "http://127.0.0.1:1338/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
10.0.2.2 - - [29/May/2019:02:59:03 -0400] "GET /pub/static/version1559030185/frontend/Magento/luma/en_US/requirejs/require.js HTTP/1.1" 404 275 "http://127.0.0.1:1338/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
10.0.2.2 - - [29/May/2019:02:59:03 -0400] "GET /pub/static/version1559030185/frontend/Magento/luma/en_US/mage/requirejs/mixins.js HTTP/1.1" 404 279 "http://127.0.0.1:1338/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
10.0.2.2 - - [29/May/2019:02:59:03 -0400] "GET /pub/static/version1559030185/frontend/Magento/luma/en_US/images/logo.svg HTTP/1.1" 404 270 "http://127.0.0.1:1338/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
10.0.2.2 - - [29/May/2019:02:59:03 -0400] "GET /pub/static/version1559030185/frontend/Magento/luma/en_US/css/print.css HTTP/1.1" 404 268 "http://127.0.0.1:1338/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
10.0.2.2 - - [29/May/2019:02:59:03 -0400] "GET /pub/static/version1559030185/frontend/Magento/luma/en_US/mage/polyfill.js HTTP/1.1" 404 271 "http://127.0.0.1:1338/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
10.0.2.2 - - [29/May/2019:02:59:04 -0400] "GET /pub/static/version1559030185/frontend/Magento/luma/en_US/requirejs-config.js HTTP/1.1" 404 274 "http://127.0.0.1:1338/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
10.0.2.2 - - [29/May/2019:02:59:04 -0400] "GET /pub/static/version1559030185/frontend/Magento/luma/en_US/mage/polyfill.js HTTP/1.1" 404 271 "http://127.0.0.1:1338/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"

And :

# cat /var/log/httpd/error_log 
[Wed May 29 02:58:59.026543 2019] [mpm_prefork:notice] [pid 3868] AH00170: caught SIGWINCH, shutting down gracefully
[Wed May 29 02:59:00.090045 2019] [core:notice] [pid 3899] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Wed May 29 02:59:00.091695 2019] [suexec:notice] [pid 3899] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
[Wed May 29 02:59:00.115984 2019] [auth_digest:notice] [pid 3899] AH01757: generating secret for digest authentication ...
[Wed May 29 02:59:00.116519 2019] [lbmethod_heartbeat:notice] [pid 3899] AH02282: No slotmem from mod_heartmonitor
[Wed May 29 02:59:00.147523 2019] [mpm_prefork:notice] [pid 3899] AH00163: Apache/2.4.6 (CentOS) PHP/7.2.18 configured -- resuming normal operations
[Wed May 29 02:59:00.147573 2019] [core:notice] [pid 3899] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'

I attached two photos.

Magento-error.pngmagento-home.png

 

Thank you.

7 REPLIES 7

Re: Home page can't show properly.

Can it because of memory?

Re: Home page can't show properly.

Hi @jason_long 

 

Try to run all these commands on Magento root directory Or check logs of Magento in var directory:

sudo rm -Rf pub/static/frontend/* var/pre_processed/* pub/static/_requirejs/*
sudo rm -Rf var/generation/* var/di/* var/cache/*
sudo php bin/magento setup:upgrade
sudo php bin/magento setup:di:compile
sudo php bin/magento setup:static-content:deploy -f
sudo php bin/magento cache:clean
sudo php bin/magento cache:flush
sudo chmod -R 777 var/ pub/ generated/

If commands not working, try by removing sudo.

 

I hope it will help you.

 

---
If you've found my answers useful, please give"Kudos" or "Accept as Solution"

Re: Home page can't show properly.

Make sure in core_config_data table the value for the path "web/unsecure/base_url" is not having localhost.

http://localhost/magento227/ - invalid path
http://127.0.0.1/magento227/ - valid path

 

Now run below commands once:

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush
sudo chmod -R 0777 var/ pub/ generated/

Prema M

Re: Home page can't show properly.

I did:

# ./magento setup:store-config:set --base-url="http://127.0.0.1:1338"
# php magento setup:upgrade
# php magento setup:static-content:deploy -f
# php magento cache:flush
# chmod -R 0777 var/ pub/ generated/

But problem exist.

I guess it is because of PHP memory!!!!

Re: Home page can't show properly.

"404" meant file not exist. I did a search and:

# find /var/www/html/ -name polyfill.js -print
/var/www/html/lib/web/mage/polyfill.js
/var/www/html/pub/static/frontend/Magento/blank/en_US/mage/polyfill.js
/var/www/html/pub/static/frontend/Magento/luma/en_US/mage/polyfill.js
/var/www/html/pub/static/adminhtml/Magento/backend/en_US/mage/polyfill.js
/var/www/html/vendor/magento/magento2-base/lib/web/mage/polyfill.js

But Magento looking the file in "/pub/static/version1559370327"!!!!

Re: Home page can't show properly.

No one had the same problem?

Re: Home page can't show properly.

Can anyone share help?