See update summary at bottom of post for changelog.
Note: December 2020 saw the release of v2 of the letsencrypt-nginx-proxy-companion project. I'...
For further actions, you may consider blocking this person and/or reporting abuse
To echo everybody else, thank you for a very clear and easy to read article on this subject. I guess there's only one way for me to find out but adding a docker-compose.yml file for the above would have been the icing on the cake (for me at least)
I'm glad you found it clear and easy to read. Apologies for serving cake without icing. I've added a docker-compose setup for this to the bottom of the post. Hope that helps.
That's brilliant, thanks. And working a treat!
Glad to hear it. I've made a further update regarding
--expose
/VIRTUAL_PORT
just in case that section didn't work exactly as expected!Great, simple explanation of these topics. Much appreciated
Is there a simple way to modify the nginx settings for redirection? It seems a bit overkill to run a dedicate container for a redirection rule in the config file
There have been some suggestions to this in recent weeks, yes. You'll have to take a look through the jwilder/nginx-proxy repo issues but IIRC there are a few discussions there. Glad this was helpful though!
I do have plans to extend it, to add things in like IP source restrictions, but just haven't had the time yet.
Thanks Adam, good explanation and this was the architecture than I used, but just yesterday I move all my reverse nginx proxy to traefik. But I'm still loving the simplicity of this solution. Thanks for sharing it 😃
Hi. Thanks a lot for this post.
I have tried many different ways to write my docker-compose file, and I still can't make this work. I just copied your example and replaced the vhosts with my own. I can always see them working on HTTP. But, on https, chrome returns NET::ERR_CERT_AUTHORITY_INVALID.
I'm using this tool to check geocerts.com/ssl-checker, and it shows the following error:
I can see that the Common Name is "letsencrypt-nginx-proxy-companion".
I also get exactly the same error for my domain registry.commonsoft.net.
Would you be able to give me a hand with this?
Thanks!
I am running into a similar issue, have you ever resolved it, @josenunez ?
The interesting thing is that it works for older subdomains I already had configured, but adding new ones - running into similar one.
Thanks for the explanation and I use your docker-compose.yml file. Maybe you can change the network name to 'service-network' for better understanding.
I have a question and maybe you can help me. I installed Ubuntu with docker on a VM of VMware ESXi with ip address 192.168.1.81. Now I have another VM on the same host with a website running Windows 2016/IIS with ip address 192.168.1.82. Is it possible to access this webserver via the reverse proxy via SSL?
LetsEncrypt have revoked around 3 million certs last night due to a bug that they found. Are you impacted by this, Check out ?
DevTo
[+] dev.to/dineshrathee12/letsencrypt-...
GitHub
[+] github.com/dineshrathee12/Let-s-En...
LetsEncryptCommunity
[+] community.letsencrypt.org/t/letsen...
Great article. Keep it up!
Good one. Thanks!
I have a project in mind where I want to augment my powerdns.com setup to provide also URL redirection and not just DNS. I would give the domain an IP/A-record that points to the nginx-proxy. Then I would use Ansible? to add a new server address to nginx/conf.d/newdomain_com.conf that redirects to what ever the final destination domain is. Maybe even use url-rewrite to redirect single subdomains or URLs.
Letsencrypt would automatically get a certificate for this newdomain, so also https-redirects would work.
Would this setup be feasible to do with the technique you explaned, but without the service containers, since I only need redirects?
Shame my web host isn't ACME-enabled... alas, switching from them to one that is... is also a pain in the gluteus maximus. Ah well. Such is life sometimes!
Great post!
I also found out that you will want
PRESERVE_URL: "true"
to theadamkdean/redirect
image, so that it keeps the url path for CSS and JS.This is such a clear explanation thanks.
Thanks, glad I was able to get the knowledge across of what could be quite a tricky solution
Great article. Really appreciated.
btw, is there a simple way to modify Nginx to have basic authentication for a specific virtual host? or container?
Sorry for the very late response. This should be possible yes. See: github.com/nginx-proxy/nginx-proxy...
How do increase upload file size?