Using a prefix for strapi routes

@DMehaffy Thank you for your quick replay. I dont use Digital Ocean Droplets, I use dedicated servers, I use nginx 1.19 on downstream, and mongoDB on ubuntu 18.04, and IIS 8 and mongoDB on windows. On both systems I got the same problem, and without the url prefix everything works fine. Mean while I tried to rebuild admin panel with the following server.js configuration:

module.exports = ({ env }) => ({
  host: env('HOST', '0.0.0.0'),
  port: env.int('PORT', 1337),
  url:'/api',
});

I eliminated the admin part of it, exactly as documentation page shows, but still with relative path. I know that an absolute url is recommended, but it didn’t sais that relative url doesn’t work. Well, I got the same result.

Here I need to add a mention: in my setup the connection between nginx and strapi goes thru http without s, since the connection is internal and environment is secure. I don’t think this should be a problem since I already told that without that url prefix everything goes fine.

So, more questions rises up:

  • can this problem be related to mongoDB?
  • when you wrote the documentation did you test the connection to the dashboard too, or just the api connection ?
  • did you test using relative urls?