Rest API with custom Domain returns 404, but graphql and /admin works

System Information
  • Strapi Version: 3.4.6
  • Operating System: Ubuntu 18.04
  • Node Version: 12.8.13
  • NPM Version: 6.14.6
  • Yarn Version: 1.22.4

I’ve setup Strapi on DigitalOcean with a Droplet and a custom subdomain.
Everything works fine - admin, graphql, registration, SSL - except I get 404 when I try to access the Rest-API.

E.g. → 404

I suspect it must be something with the proxy settings, but just can’t figure it out.
I’ve tried various configurations from the documentation, e.g.


module.exports = ({ env }) => ({
host: env('HOST', ''),
port:'PORT', 1337),
proxy: {
  enabled: true,
  host: '',
  port: 443,
  ssl: true,
url: '',
admin: {
auth: {
    secret: env('ADMIN_JWT_SECRET'),




upstream strapi {

Any idea what else I can check?


The problem is with the endpoints that I have created locally and uploaded manually.
Newly created endpoints work.

I need to migrate the database from local to live so that the endpoints work.

Ok stupid mistake.

I had in gitignore:

The problem with that line is, it’s recursive and not only root folder.

So it ignored all the config files for the routes:

Fixed by using the correct root-folder gitignore: