I have set up a Next.js frontend as a headless WordPress application, with the WordPress backend hosted on SiteGround and the Next.js frontend hosted on AWS Lightsail. I'm using GraphQL for API calls between the frontend and backend.
Locally, the application works fine, but when deployed to my Lightsail server, I encounter a 504 error (gateway timeout) when trying to access the frontend. Here are some details:
- The WordPress backend on SiteGround is functioning properly.
- The Next.js frontend is set up on a Lightsail server with Plesk.
- I've configured the appropriate GraphQL endpoint in my Next.js application.
- I have checked the server configurations, firewall settings, and ensured connectivity between the Lightsail server and SiteGround backend.
I'm not sure what could be causing the 504 error in this setup. Can someone please help me troubleshoot this issue and suggest possible solutions or areas to investigate further?
Any insights or guidance would be greatly appreciated. Thank you!
Need to figure out the issue and get rid of the 504 error