Routing with IIS URL-Rewrite reverse-proxy

System Information
  • Strapi Version:
  • Operating System:
  • Database:
  • Node Version:
  • NPM Version:
  • Yarn Version:

I’m currently running strapi in a docker container and using a URL-Passthrough in IIS as a reverse-proxy. Currently I’m sending zero/(.*) to localhost:1337/zero/{R:1} and I’ve got my server.config as

module.exports = ({ env }) => ({
  host: env('HOST', '0.0.0.0'),
  port: env.int('PORT', 1337),
  url: 'http://localhost/zero',
  admin: {
    auth: {
      secret: env('ADMIN_JWT_SECRET', 'fjksdfljsldjf'),
    },
  },
});

and I’m trying to connect to the server from cms.mydomain.com/zero/admin

I originally had no changes in module.exports but it seemed like strapi would look for files in cms.mydomain.com/filetolookfor.js

I’m not even able to access strapi through localhost:1337/zero/admin, I get a “not found”

You may want to read discutions here, about strapi url prefix.
Also here you can read original docs about server configuration.

Long story short, what you set there is the api url, to set admin url use the admin endpoint, like here:

module.exports = ({ env }) => ({
  host: env('HOST', '0.0.0.0'),
  port: env.int('PORT', 1337),
  url: 'http://localhost:1337/zero',
  admin: {
    url: 'http://localhost:1337/dashboard', // <-- default is /admin 
    auth: {
      secret: env('ADMIN_JWT_SECRET', 'fjksdfljsldjf'),
    },
  },
});