deploy-strapi-on-aws
deploy-strapi-on-aws copied to clipboard
nginx issue
Hi,
I tried to add nginx.conf to root folder on project but always got the default page of nginx, I tried to change root directory in /etc/nginx/sites-available/default but front is accessible but not admin :-(
Thanks,
strapi-cms/nginx.conf is used to replace /etc/nginx/nginx.conf, which needs sudo privilege.
Sorry, ok I replaced /etc/nginx/nginx.conf, it's working now !
I think it's a nginx conf but now I got an error on each page : 502 Bad Gateway I use same nginx.conf as you, SSL certificate are OK
Must be a server down, restart it!
I mean Strapi, not Nginx
Strapi servers are OK (prod, dev and staging) and I already tried to restart them
pm2 list
status online
Thanks,
Open the ports of the firewall, and visit them directly
All ports of the firewall were already opened (for testing purpose)
Can you access http://[ServerIP]:1337 1338 1339?
not really indeed, but strapi service is OK
Well...

What have you done after this...
Without ssl it was working, with SSL I got this 502 error. Anyway, I switched to d2c they got strapi stack hub :-)
Thanks anyway !
Without ssl it was working, with SSL I got this 502 error. Anyway, I switched to d2c they got strapi stack hub :-)
Thanks anyway !
I'm running across the same issue. With SSL I get 502 Bad Gateway. I'm unable to access the Strapi process by IP & port directly to answer @kenberkeley's last question.
Well, maybe there are updates from Strapi team that breaks everything.
Yeah, lots of updates lately w/ beta coming out. I was eventually able to reach via IP & port (own mistake of not building for production) but the nginx config is still throwing 503 gateway errors. If I figure it out, I'll post back.
Thanks for the tutorial/walkthrough! Super helpful.
@steveafrost PR is welcome