nextcloud server domain redirect apache/LE fails

May 25, 2019 150 views
Apache Let's Encrypt Ubuntu 18.04

Hi folks,
I´m sucessfully running a nextcloud 16.0.1 on Ubuntu 18.04 with apache 2.4.29. I´ve set up a DDNS on my router and ports 80 and 443 are enabled.
Problem is accessing my site. It directs me to the apache default page. Access via localhost works fine.

apachectl -S
VirtualHost configuration:
*:80                   countomega.dnshome.de (/etc/apache2/sites-enabled/001-nextcloud.conf:1)
*:443                  countomega.dnshome.de (/etc/apache2/sites-enabled/001-nextcloud.conf:51)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex ssl-stapling: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/run/apache2/" mechanism=default
Mutex mpm-accept: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33
Group: name="www-data" id=33

Any ideas?
Furthermore, creating a certificate with Let´s Encrypt doesn´t work, too.

certbot --apache
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache

Which names would you like to activate HTTPS for?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: countomega.dnshome.de
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 1
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for countomega.dnshome.de
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. countomega.dnshome.de (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://countomega.dnshome.de/.well-known/acme-challenge/8U9p_2vkcqw9tkPynA8tPSBNqnkU5sv6Ba5gn1nL1yc [93.212.147.28]: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>404 Not Found</title>\n</head><body>\n<h1>Not Found</h1>\n<p"

IMPORTANT NOTES:
 - The following errors were reported by the server:

   Domain: countomega.dnshome.de
   Type:   unauthorized
   Detail: Invalid response from
   http://countomega.dnshome.de/.well-known/acme-challenge/8U9p_2vkcqw9tkPynA8tPSBNqnkU5sv6Ba5gn1nL1yc
   [93.212.147.28]: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML
   2.0//EN\">\n<html><head>\n<title>404 Not
   Found</title>\n</head><body>\n<h1>Not Found</h1>\n<p"

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

Any help would be appriciated.

Thanks in advance

Count Omega

Be the first one to answer this question.