Report this

What is the reason for this report?

Added SMTP settings to my config.production.json file for the Ghost install on my droplet and now I am seeing 502 Bad Gateway?

Posted on June 25, 2024

Following the guidance of the config docs provided online by Ghost, and having established a Mailgun account, I opened config.production.json using nano via the console provided by DigitalOcean, added the necessary settings to establish SMTP, saved the update by hitting ^X and then enter. I ran GHOST RESTART, and all seemed well, but when I go to the URL, now there is a 502. Any advice is welcome.

The updated JSON is below with the password removed. Thank you.

{

“url”: “https://helenafitzgerald.com”,

“server”: {

"port": 2369,

"host": "127.0.0.1"

},

“database”: {

"client": "mysql",

"connection": {

  "host": "127.0.0.1",

  "user": "ghost-991",

  "password": ".2I[UTS9dIw[Du82NmeP",

  "port": 3306,

  "database": "ghost_production"

}

},

“mail”: {

"transport": "SMTP"

"options": {

  "service": "Mailgun",

  "auth": {

    "user": "postmaster@mail.helenafitzgerald.com",

    "pass": "[removed for posting]"

  }

}

},

“logging”: {

"transports": [

  "file",

  "stdout"

]

},

“process”: “systemd”,

“paths”: {

"contentPath": "/var/www/ghost/content"

}

}



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Heya,

Check your Nginx log and your Ghost app’s error log, the exact error should be present there.

It’s possible you did a typo of some sorts.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.