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.
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.
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!