Server & admin urls (relative path)

System Information
  • Strapi Version: 4.10.2
  • Operating System: Linux
  • Database: mysql
  • Node Version: v18.16.0
  • NPM Version: 9.5.1
  • Yarn Version: v1.22.19

My plan is to get Nginx and SSL to work so I am trying to get a server URL setup. However, I am stuck at getting the URLs to work.

config/env/production/admin.js:
`
module.exports = ({ env }) => ({
auth: {
secret: env(‘ADMIN_JWT_SECRET’),
},
apiToken: {
salt: env(‘API_TOKEN_SALT’),
},
transfer: {
token: {
salt: env(‘TRANSFER_TOKEN_SALT’),
},
},
url: ‘my-admin’,
});

`

config/env/production/server.js:
`
module.exports = ({ env }) => ({

host: env(‘HOST’, ‘0.0.0.0’),

port: env.int(‘PORT’, 1337),

app: {

keys: env.array('APP_KEYS'),

},

webhooks: {

populateRelations: env.bool('WEBHOOKS_POPULATE_RELATIONS', false),

},

url: ‘my-server’

});

`

I have followed the docker guide and the server started up OK:
`
strapi |

strapi | Project information

strapi |

strapi |

strapi | │ Time │ Fri May 12 2023 20:31:30 GMT+0000 (Coordinated … │

strapi | │ Launched in │ 1695 ms │

strapi | │ Environment │ production │

strapi | │ Process PID │ 18 │

strapi | │ Version │ 4.10.2 (node v18.16.0) │

strapi | │ Edition │ Community │

strapi | │ Database │ mysql │

strapi |

strapi |

strapi | Actions available

strapi |

strapi | Welcome back!

strapi | To manage your project :rocket:, go to the administration panel at:

strapi | ht tp://0.0.0.0:1337/my-server/my-admin

strapi |

strapi | To access the server :zap:, go to:

strapi | htt p://0.0.0.0:1337/my-server

strapi |

`

However, when I try to reach htt p://myhost:1337/my-server, I get:
`
{

  • data: null,
  • error:{
    • status: 404,
    • name: “NotFoundError”,
    • message: “Not Found”,
    • details: { }}
      }

strapi | [2023-05-12 20:48:14.810] http: GET /my-server (23 ms) 404
`

Accessing htt p://myhost:1337/my-server/my-admin does not work either.

What am I doing wrong?