By Morzaram
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) www.site.com Site 2 - the ghost site) www.site.com/blog
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 foobar.com and test.io 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
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!
Hello,
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;
proxy_pass http://your_ghost_droplet.com:80$1;
}
Hope that this helps! Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.