Is there a way to setup a reverse proxy to an NGINX Wordpress site with Ghost droplet (NGINX > NGINX)

Posted July 6, 2019 2k views
NginxApacheWordPressDigitalOcean ArticlesGhostUbuntu 18.04

Hey guys, I’m tasked with getting an NGINX ran Wordpress site and a Ghost droplet (1click) working with a reverse proxy on the ghost droplet. Honestly I’m not sure how the heck to go about it because everything I’ve tried has stopped midway.

Here’s the setup:
Site 1 - the wordpress site)
Site 2 - the ghost site)

Note: They’re both on NGINX (there’s not a lot of ngnix to nginx documenation out there which makes me wonder if this is where I’m messing up)

With ghost install giving me issues when doing a reverse proxy, I was planning on giving ghost a manual install after I got the reverse proxy setup.

Now I’ve followed the guide on How To Configure Nginx as a Web Server and Reverse Proxy for Apache on One Ubuntu 18.04 Server but I can never get the and up and running.

Has anyone done what I’m trying to do? Is there documentation out there on how to do it because I am legitimately stumped on why I can’t get this working.

I am quite new, and I hope this is enough information.

Thank you in advance for the help, and your patience with my lack of understanding

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.

Submit an Answer
1 answer


You could indeed just use a reverse proxy to do that. It’s not a problem that both servers are Nginx.

So in your server block for your wordpress droplet you could add something like this:

location ~/blog(.*)$ {
    proxy_set_header X-Real-IP  $remote_addr;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header Host $host;

Hope that this helps!