Access Ghost Blog via subdirectory from 2 different servers with SSL

Hi All,
Need some help.
I’ve already looked into Google and Ghost Forum regarding this and nothing seems to fit my needs and/or I can’t make it to work. Need some advice, another set of eyes to verify that my configuration is correct and/or do I need to make some adjustments.

Server 1 : - hosted in Heroku
Server 2 (this is where Ghost is installed) : - hosted in Digital Ocean

I want to access Ghost under Below are my configs.

config.production.json (assume all items are filled)

“url”: “”,
“server”: {
“port”: 2368,
“host”: “”
“database”: {
“client”: “mysql”,
“connection”: {
“host”: “localhost”,
“user”: “ghost”,
“password”: “”,
“database”: “ghost_production”
“mail”: {
“from”: “”,
“transport”: “”,
“options”: {
“service”: “”,
“host”: “”,
“port”: 587,
“auth”: {
“user”: “”,
“pass”: “”
“logging”: {
“transports”: [
“process”: “systemd”,
“paths”: {
“contentPath”: “/var/www/ghost/content”


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

root /var/www/ghost/system/nginx-root; # Used for SSL verification (

ssl_certificate /etc/letsencrypt/;
ssl_certificate_key /etc/letsencrypt/;
include /etc/nginx/snippets/ssl-params.conf;

location ^~ /blog {
    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_redirect off;

location ~ /.well-known {
    allow all;

client_max_body_size 50m;


Also, my application runs on Rails and is using reverse proxy to achieve this.

All help is appreciated.
Thanks in advance.

You can’t host one Ghost site on multiple websites, because Ghost requires a canonical url. Your url will either be or, but it can’t be both. This will be used everywhere, from sitemaps to images to the link[rel="canonical"] tag

That being said, if you’d like to host your admin interface on a separate domain, that’s possible:

Cool, thanks for your reply.