cancel
Showing results for 
Search instead for 
Did you mean: 

Bad Gateway Error after Static content deploy

Bad Gateway Error after Static content deploy

Dear Team

I Done successfully Magento Quick Start AWS Satck with sample data

then my home page visit my my static contents not load

Then i try this commends 

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

Magento demo website fully loaded

i have face 2 issue

 

1) if try to search something  my product related first i get 502 Bad Gateway

 

2) if i enable full varnish cache then i open some some products also i am get this same error

 

Please help me to slove

 

Thanks

 

5 REPLIES 5

Re: Bad Gateway Error after Static content deploy

Hello @shiras_ki 

 

https://devdocs.magento.com/guides/v2.3/config-guide/varnish/config-varnish.html

 

check above link and it will helpful

 

 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: Bad Gateway Error after Static content deploy

Thanks your reply

I understand varnish enable only production mode

but now i am facing this issue in search also

if i search something  outside my store words then i get normal error not found

if i search something my product name i get 502 bad gateway

i type something and wait 3 mint then search it's working normal

i am facing too much headache with magento

 

Re: Bad Gateway Error after Static content deploy

@shiras_ki 

 

Its about configuration how you configured vanrish with Magento. Dont get frustrated try to debug you will get some solution for this. 

 

you can check few links 

https://magento.stackexchange.com/questions/281632/varnish-with-nginx-ssl-proxy-502-error-magento-2

https://community.magento.com/t5/Magento-2-x-Hosting-Performance/Configuring-magento-with-varnish-ex...

Manish Mittal
https://www.manishmittal.com/

Re: Bad Gateway Error after Static content deploy

Actually I run AWS Magento quick start

so after deploy that magento mode is production that's why i am facing this issue

i think bcz after install i change my magento mode to developer

then no issue

 

Re: Bad Gateway Error after Static content deploy

@shiras_ki 

 

You have to run website on production with production mode to improve performance and to hide showing error on frontened.

If you are facing issue with production mode you can just run few commands and that might fix your problem.

bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy
bin/magento c:f
Manish Mittal
https://www.manishmittal.com/