0

While following the tutorial from here: https://blog.ssdnodes.com/blog/tutorial-extending-docker-nginx-host-multiple-websites-ssl/

nginx-proxy repo: https://github.com/jwilder/nginx-proxy

I have a trouble understanding how to properly setup subdomain for my docker + nginx machine, which is hosted on Digital Ocean.

I want to setup a docker with multiple Wordpress instances using nginx-proxy + let's encrypt in the following scheme:

mydomain.com --> list of all wordpress subdomains

wp1.mydomain.com --> single WP instance installed on Docker

wp2.mydomain.com --> another single WP instance installed on Docker

desired setup

In order for Reverse proxy to work properly should I add a subdomain in the Digital Ocean domain panel or not?

my dns settings preview If I should, where should that subdomain point to? I am using single VPS, and the main domain is pointing to VPS IP. If I am getting it right, my subdomain should be pointing to something like [myserverIP]:[dockerContainerPortNumber] but after setting this in the Domain settings panel what's the point for configuring the nginx-proxy?

I think that the rest of the config works fine, I am just not able to understand how to set those subdomains so the inner routing started to work fine.

1 Answers1

0

Yes, you do need to configure dns for the subdomains. The subdomains should point to the IP address of your droplet. Without the dns entry there is no way for a client to know that wp1.mydomain.com should go to your droplet IP. The proxy should read the FQDN in the URL and point the request to the correct application.

JohnK
  • 16
  • 1