Fill out the following bug report template with as much detail as possible!
Are you sure this is a bug? If you just need help, post in the developer help category. If it’s a feature request, head to the ideas category.
Issue Summary
Recently (just upgraded to Ghost v5.126.1) the Portal has been failing to load. The console reported the following exception from portal.min.js
:
[Portal] Failed to initialize: TypeError: e.url is undefined
Additionally, I noticed the generated HTML (theme is source
v1.5.0) contained the following snippet:
data-api="https://haynie-sirrine.community/ghost/ghost/api/content/"
The duplicated /ghost/ghost/
seemed odd to me. I was able to resolve the issue by removing the admin
section of config.production.json
, though I’m not sure what I had done wrong regarding the routing. Serving Ghost behind Nginx with LetsEncrypt SSL.
Steps to Reproduce
- In
config.production.json
, setadmin.url
tohttps://haynie-sirrine.community/ghost
(in my case). - Visit
/#/portal/signup
and inspect console errors. - Curl
/ghost/api/content/site
with custom API key (404).
Setup information
Ghost Version
Share which version of Ghost you’re using.
Ghost 5.126.1
Node.js Version
Node v18.20.6
How did you install Ghost?
Ghost installed via ghost-cli
and managed by systemd
.
Provide details of your host & operating system
Linode running Ubuntu 24.04, reverse proxy behind Nginx, SSL via LetsEncrypt
Database type
MySQL 8.0.42-0ubuntu0.24.04.1
Browser & OS version
Firefox on Fedora 41. Issue persists on Firefox for Android as well. Observed on Chrome.
Relevant log / error output
curl "https://haynie-sirrine.community/ghost/api/content/site/?key=REDACTED"
Jun 21 20:14:58 localhost node[1582]: [2025-06-21 20:14:58] INFO "GET /ghost/api/content/site/?key=REDACTED" 404 3ms
Additionally, here are the contents of my nginx configuration files:
haynie-sirrine.community.conf
:
map $status $header_content_type_options {
204 "";
default "nosniff";
}
server {
if ($host = haynie-sirrine.community) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
listen [::]:80;
server_name haynie-sirrine.community;
root /var/www/haynie-sirrine.community/system/nginx-root; # Used for acme.sh SSL verification (https://acme.sh)
set_real_ip_from 127.0.0.1;
real_ip_header X-Forwarded-For;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header Origin $http_origin;
proxy_set_header Referer $http_referer;
proxy_pass http://127.0.0.1:2372;
add_header X-Content-Type-Options $header_content_type_options;
}
location ~ /.well-known {
allow all;
}
client_max_body_size 50m;
}
haynie-sirrine.community-ssl.conf
:
map $status $header_content_type_options {
204 "";
default "nosniff";
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name haynie-sirrine.community;
root /var/www/haynie-sirrine.community/system/nginx-root; # Used for acme.sh SSL verification (https://acme.sh)
ssl_certificate /etc/letsencrypt/live/haynie-sirrine.community/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/haynie-sirrine.community/privkey.pem; # managed by Certbot
include /etc/nginx/snippets/ssl-params.conf;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header Origin $http_origin;
proxy_set_header Referer $http_referer;
proxy_pass http://127.0.0.1:2372;
add_header X-Content-Type-Options $header_content_type_options;
}
location ~ /.well-known {
allow all;
}
client_max_body_size 1g;
}