Hi i followed to the tutorials how to set up ubuntu, nginx, pm2. i set up nginx + nextjs 13. text content is served well.
i have an issue with serving images together with nextjs optimization mechanizm.
for some reason request www.uppr[.]com[.]ua/_next/image?url=%2Fassets%2Fimages%2Fblog-articles%2Facronyms_which_you_should_use_in_emails_main.jpg&w=1920&q=75 gives me 500 error.
I read information in internet and understood that it is due to double routing on nginx side and nextjs server side.
Please could you provide example of the correct configuration for the nginx + nextjs for such cases.
site for example is uppr[.]com[.]ua/blog
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $200 of credit to try our products over 60 days!
I could suggest starting with the following:
That way you should be able to see the actual error causing the problem rather than the generic 500 error.
Feel free to share the error here so we could try to advise you further!