Strapi backendURL

Hi, I just won a battle with Strapi’s missing admin/init, and want to share my story - maybe it will help some folks in a near future.

I have a frontend developed with Next.js that’s fetching data from Strapi using simple fetch in /pages/api/content/[request].js. The integration with Strapi was tested on my local machine and it worked well. Sadly, when deployed using Nginx’ reverse proxy Strapi’s /admin page failed to load (Next showed it’s 404 page), but the data was fetched successfully. Strange.

I had tested various approaches (including loading Strapi from sub-directory), read nginx-proxy section in Strapi’s documentation a bunch of times, and the best I had achieved was missing admin/init when trying to access /dashboard(configured both on nginx and config/server.js). So, finally, I tried something, that should not change anything - change Strapi’s path from some-path to just somepath. And it worked.

TL;DR in my case the - in Strapi’s URL was the problem. I still don’t know if it was Next’s doing or Strapi’s fault (I don’t blame nginx for this tho), but it’s worth to check it out.

So, my advice with admin/init 404 is to remove - from your URL, if you have any, and then check again.