Report this

What is the reason for this report?

Ghost Blog Setup different droplet

Posted on January 5, 2019

Hey DO Community,

Current setup

Droplet 1 - Main Site. Droplet 2 - Blog running Ghost.

Issue

I want to be able to point my domain (currently pointing at Droplet 1 the main droplet) to my second droplet that is running the Ghost Blog with the following url

(Domain and IP’s hidden for security purposes)

www.domain.com/blog

Current Config’s

Droplet 1 - Main Config

I have added the following to my NGINX config;

location /blog {
                proxy_pass http://(ip of ghost droplet):80;
                proxy_redirect off;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }

Droplet 2 - Ghost Config

  "url": "http://www.domain.com/blog",
  "server": {
    "port": 2368,
    "host": "127.0.0.1"
  },

However, when I am now going to www.domain.com/blog - I am getting a 404.

Whenever I go to the ip for the ghost install I am getting a message; 502 Bad Gateway - Am I missing something?

J



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello,

Have you tried setting your proxy_pass in your Nginx config to:

        proxy_pass http://(ip of ghost droplet):2368;

You would need to make sure that port 2368 is open as well.

Regards, Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.