How create another subdirectory where ghost is already installed


I installed ghost with digital ocean one click ghost install and want to create a subdirectory to add another website within it.

So the structure look like.


I want to integrate a custom tool in sub directory .

What I do in this case?

Wouldn’t it be better to create a collection? Perhaps you can explain what you’re trying to achieve?

I want to create a custom app on subdirectory

You’ll need to setup nginx to proxy the sub directory to the specific Ghost instance and port. Something like this…

location /folder(/.*)$ {
    rewrite ^ $1 break;
    proxy_pass  https://ghostblog.tld:<port>/folder$1;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;


Thanks for this but 2 questions 1). https://ghostblog.tld: I change this with the ip address or domain.

  1. Where I add this in /etc/nginx/sites-enabled or somewhere else.

And I need to restart nginx or ghost after saving it.


I suggest you read up on a few tutorials. Try this one for starters.

Ghost is usually running on http://localhost:<port>. In contrast, nginx is proxying this to your chosen domain. You don’t edit anything in sites-available as this should only contain symbolic links to sites-available.

Hello mjw,

I tried but I’m not expert in development field can you please help me to solve the exact problem.

See my current installation looks like
Var/www/ghost for the main website

And for app I set


So what file I edit to serve ‘to’ folder.

I don’t mind helping, but you need to be committed to read and learn too. You also need to be clear about what you’ve got working including the steps you’ve taken, and what remains to be done. It’s not clear if there is a problem or not as you’ve not shared sufficient information. Please format posts correctly too.

Is the ‘app’ another Ghost instance or something else? Each Ghost instance is installed at /var/www, so don’t nest them. Since you only have one web server, i.e., a single domain, all the changes are in the same nginxconfig files.

You may fare better employing someone or using a Ghost hosting service.


I love to learn. I learned about ghost by reading docs I started to build ghost theme by reading docs and watching YT videos.

But sometimes you need to take help of someone to solve some critical problem.

I also tried to do work with some freelancers on fiverr but not anyone able to do the work and tell me to use wordpress instead.

But I love ghost. So instead of wasting time. I decided to do it myself.

So here is full story.

I have a ghost installed on Digital ocean.

And I want to add my created web app which is not a ghost to subfolder.

That I need to install on this url

But after entering the url I get 404 on ghost.

I added the app in


I also created conf.d in nginx to add code restart nginx but not working.

So I don’t know I did something wrong or right.

But I still lack some technical skills I’m unable to point the app on domain.

That’s because there’s no Ghost page, and your web server is only configured for Ghost.

You need to share more about the web app. What port does it run on, e.g., http://localhost:1234? What is it written in, and is it setup with systemd etc.?

You shouldn’t need to edit conf.d since you already have the Ghost config for the domain. Likewise, install the app in /var/www/app not the Ghost folder.