Unable to login as admin in ghost

So I made a fresh installation of Ghost, and I migrated the data. In a few days, I was not be able to log in as admin; it took 1 minute just to get the response from this POST /ghost/api/admin/session. First, I thought it was an nginx problem, well, maybe a few, I'll add my current one here. It had something to do with Proto, and also I had to fix with a different root domain and www.

location / {
        proxy_pass http://127.0.0.1:2368;

        proxy_http_version 1.1;

        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header X-Forwarded-Host $host;

        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";

        proxy_connect_timeout 60s;
        proxy_send_timeout 60s;
        proxy_read_timeout 60s;
}
    

Ok, so here's the culprit, in config "config.production.json" set this to false. In the default configuration, I do not have a mail service running. In the system, when the admin is trying to log in, I think it sends a verification email, then it waits, it's so long that it gives 504 nginx.

"staffDeviceVerification": false

Subscribe to Building software. Writing what I learn.

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
[email protected]
Subscribe