I hosted my web server with nginx server blocks a VPC and put it behind internet gateway as described here. So my web server public ip is not usable. How do I access to my website through internet gateway?. I couldn’t find any docs.
And also if I add another droplet for API behind internet gateway, how do I connect to the API from web server? I’m beginner and learning new things. Of course I don’t need all those thing I asked above. I’m curious and want to how things works.
Thanks😃.
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!
Hi there,
The example that you’ve shared is mainly aimed to show how you can setup a NAT so that the outgoing traffic from your backend Droplets would go through the gateway server. So it goes like this:
The case that you are describing is for inbound traffic. So you could do that with an Nginx reverse proxy:
Here is a quick diagram of how it would look with a DMZ load balancer:

Hope that this helps!
Best,
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.