Integrate the Self Hosted Ghost in webflow

Shaharyar
2 min readFeb 18, 2021

--

Recently the marketing team of my organization shifted to webflow but for SEO Purpose they wanted to have Ghost blog at a particular route

Recently marketing team of my organization shifted to webflow + Ghost so for some SEO purpose they wanted to have the Ghost at /s route instead of some subdomain . So I volunteer for the task but as all software developer do google the stuff and do I did the same but unfortunately there was not any resource available so this task become challenging for me

So now problem statement was xyz.com is webflow website and xyz.com/s should redirect to the Self hosted Ghost I figured out it can be done with the help of nginx easily.

So tools used will be

  1. webflow
  2. self Hosted Ghost
  3. nginx
  4. cloudflare

Step to Step guide is as follows.

  1. Setup The webflow website and use non-www as default one there you will be provided with two IP address note it down . it will be used later in nginx setup
  2. self host the Ghost blog on any EC2 instance but we choose digital ocean droplet for this purpose you can use anything you want use this command to set up the Ghost:
docker run -d --name ghost-deploy -e url=https://xyz.com/s/ -p 2368:2368

Note: This is unofficial docker image of Ghost but it is being maintained by contributor at the Ghost

URL is defined as https://xyz.com/s/ for internal routing of Ghost

3. Now on the same server install nginx and run following and in /etc/nginx/sites-enabled/default paste following code

it is self explanatory but still few key points are:

a. in upstream block a.b.c.d and w.x.y.z are two IP address generated in first setup while setting up webflow

b. so whenever someone search for xyz.com it will redirect to webflow and whenever some one search with /s route then it will be redirect to ghost install at our localhost 2368 port

c. you can generate certificate using letsencrypt

and run the command

sudo systemctl start nginx

4. Cloudflare setup

In cloudflare make a root entry with IP address of the server with nginx and Ghost install.

This way you can setup the Webflow with nginx

--

--