Search code examples
strapi

how to correct nginx conf with strapi


what's the problem of this nginx.conf? I had to change somewhere but still not working ..

upstream strapi {
    server localhost:1337   max_fails=1 fail_timeout=5s;
}
server {

# Listen HTTP
    listen 80 default_server;
    listen [::]:80 default_server;
    server_name sh**rk.app;

# Proxy Config
    location / {
        try_files $uri $uri/ @strapi;
    }

    location @strapi{
        proxy_pass http://strapi;
    }

}

Solution

  • ok you can configure with this way that is a good way deploy strapi on ubuntu server