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.
https://api.domain.com/global → 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.
https://strapi.io/documentation/developer-docs/latest/deployment/nginx-proxy.html#nginx-proxying
/config/server.js
module.exports = ({ env }) => ({
host: env('HOST', '0.0.0.0'),
port: env.int('PORT', 1337),
proxy: {
enabled: true,
host: 'api.domain.com',
port: 443,
ssl: true,
},
url: 'https://api.domain.com',
admin: {
auth: {
secret: env('ADMIN_JWT_SECRET'),
},
},
});
/nginx/sites-available/strapi.conf
upstream.conf
upstream strapi {
server 127.0.0.1:1337;
}
Any idea what else I can check?