Let's Encrypt > NextCloud reverse proxy issues (Bad Gateway / host not found)

    • OMV 4.x
    • Let's Encrypt > NextCloud reverse proxy issues (Bad Gateway / host not found)

      I have following nextcloud subdomain config in the let's encrypt docker:

      Source Code

      1. server {
      2. listen 443 ssl;
      3. listen [::]:443 ssl;
      4. server_name get.*;
      5. include /config/nginx/ssl.conf;
      6. client_max_body_size 0;
      7. location / {
      8. include /config/nginx/proxy.conf;
      9. resolver 127.0.0.11 valid=30s;
      10. set $upstream_nextcloud nextcloud;
      11. #proxy_max_temp_file_size 2048m;
      12. proxy_max_temp_file_size 1924m;
      13. proxy_pass https://$upstream_nextcloud:443;
      14. }
      15. }
      Display All


      But as a result I get following error message:

      Source Code

      1. 2019/07/11 15:11:42 [error] 369#369: *5 nextcloud could not be resolved (3: Host not found), client: 192.168.0.1, server: get.acme.net, request: "GET /favicon.ico HTTP/2.0", host: "get.acme.net", referrer: "https://get.acme.net/"



      What could be the reason?
      Why is the "nextcloud" host not found?
    • d4vid wrote:

      I got it working be replacing


      Source Code

      1. proxy_pass https://$upstream_nextcloud:443;
      with


      Source Code

      1. proxy_pass https://192.168.0.111:444;

      Still, but be great to find out the reason for the problem. Just doesn't feel right, when the defaults don't work ;)
      Probably the letsencrypt docker does not find the nextcloud docker under its name. This should be resided but the docker internal dns service but only works if the containers share the same docker network. Is your nextcloud docker named "nextcloud" and is it joined in a docker network with the letsencrypt container?

      The post was edited 1 time, last by Morlan ().