Hello,
There are four domain names on my server, and I try to config the third domain name with ssl. I run the command # certbot --authenticator webroot --installer apache
and it prints output
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel):3
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for abc.domain.com
Select the webroot for abc.domain.com:
-------------------------------------------------------------------------------
1: Enter a new webroot
-------------------------------------------------------------------------------
Press 1 [enter] to confirm the selection (press 'c' to cancel): 1
Input the webroot for abc.domain.com: (Enter 'c' to cancel):/srv/apps/abc/build.webpack/
Waiting for verification...
Cleaning up challenges
Generating key (2048 bits): /etc/letsencrypt/keys/0009_key-certbot.pem
Creating CSR: /etc/letsencrypt/csr/0009_csr-certbot.pem
Error: should only be one vhost in /etc/apache2/sites-available/abc.domain.conf
Currently, we only support configurations with one vhost per file
IMPORTANT NOTES:
- Unable to install the certificate
the domain conf file abc.domain.conf
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
ServerName abc.domain.com
ServerAdmin webmaster@abc.com
DocumentRoot /srv/apps/abc/build.webpack/
<Directory />
AllowOverride all
Require all denied
</Directory>
<Directory "/srv/apps/abc/build.webpack/">
Options MultiViews FollowSymLinks
AllowOverride all
Require all granted
</Directory>
<DirectoryMatch "^/.*/\.git/">
ErrorDocument 403 /404.html
Order allow,deny
Deny from all
Satisfy All
</DirectoryMatch>
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/abc.error.log
CustomLog ${APACHE_LOG_DIR}/abc.access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
I’ve checked many times, there is ONLY one vhost in the conf file.
My OS is debian 8 and certbot 0.10.2. There is no problem on debian 9 or ubuntu. How can I fix the problem? Thanks!