Report this

What is the reason for this report?

How to Host Multiple Docker Containers on a Single Server with Nginx Reverse Proxy?

Posted on May 13, 2021

At the urging of the video creator, I am posting this question mainly for educational purposes.

I followed the instructions in the video and managed to have a working proxy server just like video ones. Issues start when I decided to set up the same proxy server on a Linux distribution other than Ubuntu. I tried it in Arch, open suse, centos and red hat. Although everything was done correctly, such as installing programs, setting up applications and configurations, the proxy failed to serve the containers but served the nginx default page.

A little background.

  1. The domain names are not stated by a DNS host but /etc/host was used as a DNS server.
  2. Containers possible to reached with ip and port number but not with server name.
  3. Above tried both in cloud servers and local VM engines with same results (only Ubuntu success.)


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.

Hi there,

What is the exact error that you get when you try to run this on another distribution?

What you would need to do is:

  • First install Nginx, you can do that by following the steps here:

https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-centos-7

  • Then add the Nginx server blocks at /etc/nginx/conf.d rather than sites-avaialbe

The rest of the video should work as expected. Feel free to share the exact error that you are getting here if it still does not work.

Regards, Bobby

The developer cloud

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

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Dark mode is coming soon.