greyltc / docker-owncloud

Arch linux based docker container with owncloud
111 stars 37 forks source link

Unable to get Lets Encrypt certificate from 9.1.2-1 #112

Closed igor-bn closed 7 years ago

igor-bn commented 7 years ago

Here is the second issue I faced after updating to l3iggs/owncloud:latest (aka 9.1.2-1). I get following error from certbot:

 - The following errors were reported by the server:

   Domain: home-net.example.com
   Type:   unauthorized
   Detail: Invalid response from
   http://home-net.example.com/.well-known/acme-challenge/3g9fwJ6sFIjdx_1h7xn97s0_uY51rS58oP53BVC7iQU:
   "<?xml version="1.0" encoding="UTF-8"?>
   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/D"

   To fix these errors, please make sure that your domain name was
   entered correctly and the DNS A record(s) for that domain
   contain(s) the right IP address.

Please note, I replaced my domain with "home-net.example.com" in this example. The output makes me think that Apache delivers some standard web page here (404?) instead of actually serving the file. It looks like apache rules got broken.

openserverware commented 7 years ago

I get the same error when following the C option with greyltc/nextcloud:latest.

jswetzen commented 7 years ago

I have the same error. I tracked it down to the certbot command specifying the webroot to be /srv/http and /etc/httpd/conf/extra/httpd-acme.conf pointing .well-known/acme-challenge to /var/lib/letsencrypt/. In a running owncloud container named oc, this command fixes it:

sudo docker exec -it oc sed -i 's/srv\/http/var\/lib\/letsencrypt/' /usr/sbin/setup-apache-ssl-key

I couldn't find where that script is added though.

jswetzen commented 7 years ago

There, now I have a pull request for you @greyltc. It's always easier to get a fix served :)

openserverware commented 7 years ago

Much appreciated,

Thank you!

On 01/31/2017 10:17 PM, Johan Swetzén wrote:

There, now I have a pull request for you @greyltc https://github.com/greyltc. It's always easier to get a fix served :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/greyltc/docker-owncloud/issues/112#issuecomment-276495359, or mute the thread https://github.com/notifications/unsubscribe-auth/AXs9o7rbW2n1CSp5bgQDPyJlUX5y2Gycks5rX6UBgaJpZM4LR_Ev.

greyltc commented 7 years ago

PR accepted. Thanks!