Apache configuration file error

#1

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: nuudle.getone.io

I ran this command: sudo certbot certonly --webroot -d nuudle.getone.io -w /var/www/nuudle --agree-tos --force-renewal --dry-run

It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for nuudle.getone.io
Using the webroot path /var/www/nuudle for all unmatched domains.
Waiting for verification…
Challenge failed for domain nuudle.getone.io
http-01 challenge for nuudle.getone.io
Cleaning up challenges
Some challenges have failed.

IMPORTANT NOTES:

  • The following errors were reported by the server:

    Domain: nuudle.getone.io
    Type: connection
    Detail: Fetching
    http://nuudle.getone.io/.well-known/acme-challenge/EyN-n8HejWvJTEmeyau3H_CbkYuMvJIE532QnLaWHag:
    Timeout during connect (likely firewall problem)

    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. Additionally, please check that
    your computer has a publicly routable IP address and that no
    firewalls are preventing the server from communicating with the
    client. If you’re using the webroot plugin, you should also verify
    that you are serving files from the webroot path you provided.

I tried this command and getting error in apache configuration file
apachectl -t -D DUMP_VHOSTS
AH00526: Syntax error on line 131 of /etc/apache2/sites-enabled/000-default-ssl.conf:
SSLCertificateFile: file ‘/etc/letsencrypt/live/nuudle.getone.io/fullchain.pem’ does not exist or is empty
Action ‘-t -D DUMP_VHOSTS’ failed.

My web server is (include version):

The operating system my web server runs on is (include version): Unubutu 16.04

My hosting provider, if applicable, is: aws

I can login to a root shell on my machine (yes or no, or I don’t know): Yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): yes

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot):version: 0.33.1

#2

Hi @karun

your http port 80 doesn’t answer. That’s critical ( https://check-your-website.server-daten.de/?q=nuudle.getone.io ):

Domainname Http-Status redirect Sec. G
http://nuudle.getone.io/
34.211.42.201 -14 10.030 T
Timeout - The operation has timed out
https://nuudle.getone.io/
34.211.42.201 403 1.956 M
Forbidden
http://nuudle.getone.io/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de
34.211.42.201 -14 10.027 T
Timeout - The operation has timed out
Visible Content:

But your https works.

Is there a firewall? Or is this a home server, so your ISP blocks port 80? Or blocks your router? (Missing port forwarding?)

Why is this file empty?

Did you delete it?

What says

certbot certificates

There should be a self signed certificate you can use. Or disable the 000-default-ssl.conf.

#3

ubuntu@ip:$ certbot certificates
Requesting to rerun /usr/bin/certbot with root privileges…
Saving debug log to /var/log/letsencrypt/letsencrypt.log


Found the following certs:
Certificate Name: nuudle.getone.io
Domains: nuudle.getone.io
Expiry Date: 2019-04-15 23:53:11+00:00 (VALID: 5 hour(s))
Certificate Path: /etc/letsencrypt/live/nuudle.getone.io/fullchain.pem
Private Key Path: /etc/letsencrypt/live/nuudle.getone.io/privkey.pem

The certificate files are there. Further
sudo ls -lt /etc/letsencrypt/live/nuudle.getone.io
total 4
lrwxrwxrwx 1 root root 40 Jan 16 00:53 cert.pem -> …/…/archive/nuudle.getone.io/cert6.pem
lrwxrwxrwx 1 root root 41 Jan 16 00:53 chain.pem -> …/…/archive/nuudle.getone.io/chain6.pem
lrwxrwxrwx 1 root root 45 Jan 16 00:53 fullchain.pem -> …/…/archive/nuudle.getone.io/fullchain6.pem
lrwxrwxrwx 1 root root 43 Jan 16 00:53 privkey.pem -> …/…/archive/nuudle.getone.io/privkey6.pem

and

netstat -tnlpa
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp6 0 0 :::22 :::* LISTEN -
tcp6 0 0 :::443 :::* LISTEN -
tcp6 0 0 :::80 :::* LISTEN -

Do you think ipv4 is not open?

#4

I can do nslookup from outside:
$nslookup nuudle.getone.io
Server: 135.222.4.57
Address: 135.222.4.57#53

Non-authoritative answer:
Name: nuudle.getone.io
Address: 34.211.42.201

#5

If that wouldn’t work, nobody would be able to connect the domain.

The connection doesn’t work, the dns query works.

#6

Hi JuergenAuer,
I did not delete anything and I have renewed several times with the same configuration.
One more question. The certificate are expiring today. What are my alternatives?

Thanks

#7

Does it work if you try again? I actually can connect to your instance right now…

#8

There is a new check. Looks like you have changed your configuration.

Domainname Http-Status redirect Sec. G
http://nuudle.getone.io/
34.211.42.201 301 https://nuudle.getone.io/ 0.356 A
https://nuudle.getone.io/
34.211.42.201 403 1.706 M
Forbidden
http://nuudle.getone.io/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de
34.211.42.201 301 https://nuudle.getone.io/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de 0.354 A
Visible Content: Moved Permanently The document has moved here . Apache/2.4.18 (Ubuntu) Server at nuudle.getone.io Port 80
https://nuudle.getone.io/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de 404 1.444 A

Now port 80 is open.

So try to create a certificate.

PS: And /.well-known/acme-challenge/unknown-file has a redirect (that’s ok), then the expected http status 404 - not found, that’s good.

#9

Thanks,
create a new certificate not renew teh currnet one? What is correct command to use?

#10

Use the same command from your topic, but without --dry-run, that’s the test system.

Or test it one time to see if your webroot works.

#11

Thanks a lot JuergenAuer,
It worked now.
So I have to open port 80 before I do this so that I don’t run into this issue in future.

1 Like