docker icon indicating copy to clipboard operation
docker copied to clipboard

example docker/.examples/docker-compose/with-nginx-proxy/mariadb/apache

Open VladDrakul1986 opened this issue 5 years ago • 1 comments

Hi i got a strange behavior when using the docker/.examples/docker-compose/with-nginx-proxy/mariadb/apache example on my dockerhost. retrieving of the certificated failed. What i have done:

  1. I clone the example
  2. add in the db.env MYSQL_PASSWORD=mysupersecretpassword
  3. editing in docker-compose.yml in the mariadb image section the MYSQL_ROOT_PASSWORD=mysupersecretrootpassword
  4. in the nextcloud image section i edit the VIRTUAL_HOST and LETSENCRYPT_HOST to mydomainname.duckdns.org and put LETSENCRYPT_EMAIL to [email protected]
  5. editing the volume section to volumes:
db:
  driver_opts:
    type: none
    device: /sharedfolders/Docker/210829NextcloudDB
    o: bind
nextcloud:
  driver_opts:
    type: none
    device: /sharedfolders/Docker/210829Nextcloud/data
    o: bind
certs:
  driver_opts:
    type: none
    device: /sharedfolders/Docker/210829Nextcloud/proxy/certs
    o: bind
acme:
  driver_opts:
    type: none
    device: /sharedfolders/Docker/210829Nextcloud/proxy/acme
    o: bind
vhost.d:
  driver_opts:
    type: none
    device: /sharedfolders/Docker/210829Nextcloud/proxy/vhost.d
    o: bind
html:
  driver_opts:
    type: none
    device: /sharedfolders/Docker/210829Nextcloud/proxy/html
    o: bind

What is going wrond? generation of the certificate failed with following log messages

[Sun Aug 29 09:00:18 UTC 2021] The domain key is here: /etc/acme.sh/[email protected]/mydomainname.duckdns.org/mydomainname.duckdns.org.key
[Sun Aug 29 09:00:18 UTC 2021] Single domain='mydomainname.duckdns.org'
[Sun Aug 29 09:00:18 UTC 2021] Getting domain auth token for each domain
[Sun Aug 29 09:00:20 UTC 2021] Getting webroot for domain='mydomainname.duckdns.org'
[Sun Aug 29 09:00:20 UTC 2021] Verifying: mydomainname.duckdns.org
[Sun Aug 29 09:00:24 UTC 2021] mydomainname.duckdns.org:Verify error:No valid IP addresses found for mydomainname.duckdns.org

What i did to find to problem: I can visit http://mydomainname.duckdns.org so the message seems to be not suitable because the ip is valid any other ideas what actually goes wrong? (and really seeing my nextcloud side and see in proxy log the access to the side). If i visit https://mydomainname.duckdns.org i get an 500 which fits to the generated default.conf i guess this would be updated when the certificate generation was successfully.

https part of the generated default.conf

server {                                              
        server_name mydomainname.duckdns.org;                          
        listen 443 ssl http2 ;                                                                     
        access_log /var/log/nginx/access.log vhost;                   
        return 500;                                                                                                                                                                
        ssl_certificate /etc/nginx/certs/default.crt;
        ssl_certificate_key /etc/nginx/certs/default.key;                                                                                                    
}   

while research i found out that com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy is a legacy registry it moved to https://hub.docker.com/r/nginxproxy/acme-companion maybe this would be worth an update too.

VladDrakul1986 avatar Aug 29 '21 09:08 VladDrakul1986

Please use https://help.nextcloud.com/ for individual deployment questions.

J0WI avatar Jun 23 '23 14:06 J0WI