1

I'm trying to use certbot to get a certificate for my http server running nextcloud (archarm on a raspi). When I run: $ sudo certbot --apache, I get:

$ sudo certbot --apache Saving debug log to /var/log/letsencrypt/letsencrypt.log Plugins selected: Authenticator apache, Installer apache No names were found in your configuration files. Please enter in your domain name(s) (comma and/or space separated) (Enter 'c' to cancel): 

I then enter my domain: example.duckdns.org upon which I get:

Obtaining a new certificate Performing the following challenges: http-01 challenge for example.duckdns.org Cleaning up challenges Unable to find a virtual host listening on port 80 which is currently needed for Certbot to prove to the CA that you control your domain. Please add a virtual host for port 80. 

While I do have example_duckdns.conf in /etc/httpd/conf/extra which looks like:

<Directory /var/www/html/nextcloud> Require all granted </Directory> <VirtualHost *:80> DocumentRoot "/var/www/html/nextcloud" ServerName example.duckdns.org ServerAlias example.duckdns.org ServerAdmin [email protected] ErrorLog "/var/log/httpd/error_log_example_duckdns_org" CustomLog "/var/log/httpd/access_log_example_duckdns_org" combined </VirtualHost> 

And I get:

$ apachectl configtest Syntax OK 

What do I have wrong?

Using: Apache/2.4.43

1
  • @telcoM yep, you're right, I did not include my VirtualHost file n the Apache conf. Once I did this, the domain was recognized correctly! You can move this comment into an aswer and I'll accept gladly! Thanks! Commented Jul 22, 2020 at 13:39

1 Answer 1

1

Sure, your /etc/httpd/conf/extra looks correct, but does your main Apache configuration file (or any file included by it) have anything like Include /etc/httpd/conf/extra or IncludeOptional /etc/httpd/conf/* in it anywhere?

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.