Getting a redirect loop (301) on install

This is a new install of ghost, version 2.29.1. I’m running nginx as my ssl layer and proxy. The url is .

My configuration is as follows

   "url": "",
   "server": {
     "port": 2368,
    "host": ""
"database": {
"client": "sqlite3",
"connection": {
  "filename": "./content/data/ghost.db"
 "mail": {
"transport": "Direct"
"logging": {
 "transports": [
 "process": "systemd",
 "paths": {
  "contentPath": "/home/website/blog/content"

Nginx configuration is

server {
listen 443 ssl;
listen [::]:443 ssl;

ssl on;
ssl_certificate         /root/;
ssl_certificate_key     /root/;

root /var/www/html;
index index.html index.htm index.nginx-debian.html;

location / {
    rewrite ^/route/?(.*)$ /$1 break;
    proxy_set_header Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-NginX-Proxy true;

    proxy_redirect off;

Which works with my other node servers.

The server works if I simply remove the “url” field in the config, but many of the links and images end up broken without that value so I’m trying to figure this out before I try to bring it online for real. I like ghost as I’ve used it before, but this issue has me stumped.

Additionally, there is no 301 redirect if I take down the ghost server and nginx shows the gateway failure as expected. If I connect directly to ghost locally, I still see the 301.

You’re missing the X-Forwarded-Proto header

See the default nginx template: