ubuntu@ip-172-26-1-129:~$ sudo certbot install --cert-name 8teeth.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Deploying certificate
Some rewrite rules copied from /etc/apache2/sites-enabled/000-default.conf were disabled in
the vhost for your HTTPS site located at /etc/apache2/sites-available/000-default-le-ssl.c
onf because they have the potential to create redirection loops.
Could not install certificate
Could not reverse map the HTTPS VirtualHost to the original
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile
/var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
ubuntu@ip-172-26-1-129:/etc/apache2/sites-enabled$ pwd
/etc/apache2/sites-enabled
ubuntu@ip-172-26-1-129:/etc/apache2/sites-enabled$ ls
000-default.conf
Contents of '000-default.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 www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
# 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}/error.log
CustomLog ${APACHE_LOG_DIR}/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
ServerName 8teeth.com
ServerAlias www.8teeth.com
RewriteEngine on
RewriteCond %{HTTP_HOST} ^8teeth.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.8teeth.com$
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
(b) The contents of /etc/apache2/sites-available/000-default-le-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost *:443>
# 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 www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
# 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}/error.log
CustomLog ${APACHE_LOG_DIR}/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
Also, I ran 'certbot install --cert-name 8teeth.com' and got this error:
ubuntu@ip-172-26-1-129:~$ certbot install --cert-name 8teeth.com
The following error was encountered:
[Errno 13] Permission denied: '/var/log/letsencrypt/.certbot.lock'
Either run as root, or set --config-dir, --work-dir, and --logs-dir to writeable paths.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/certbot-log-2wh_jg5i/
log or re-run Certbot with -v for more details.
ubuntu@ip-172-26-1-129:~$
So I ran 'sudo certbot install --cert-name 8teeth.com' and got this output:
ubuntu@ip-172-26-1-129:~$ sudo certbot install --cert-name 8teeth.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Deploying certificate
Some rewrite rules copied from /etc/apache2/sites-enabled/000-default.conf were disabled in the vhost for your HTTPS
site located at /etc/apache2/sites-available/000-default-le-ssl.conf because they have the potential to create redire
ction loops.
Could not install certificate
Could not reverse map the HTTPS VirtualHost to the original
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letse
ncrypt.log or re-run Certbot with -v for more details.
ubuntu@ip-172-26-1-129:~$
Perhaps I should ask your suggestions for the contents of '/etc/apache2/sites-available/000-default-le-ssl.conf'
ubuntu@ip-172-26-1-129:~$ sudo certbot install --cert-name 8teeth.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Deploying certificate
Some rewrite rules copied from /etc/apache2/sites-enabled/000-default.conf were disabled in
the vhost for your HTTPS site located at /etc/apache2/sites-available/000-default-le-ssl.c
onf because they have the potential to create redirection loops.
Successfully deployed certificate for 8teeth.com to /etc/apache2/sites-available/000-defaul
t-le-ssl.conf
Successfully deployed certificate for www.8teeth.com to /etc/apache2/sites-available/000-de
fault-le-ssl.conf
Added an HTTP->HTTPS rewrite in addition to other RewriteRules; you may wish to check for o
verall consistency.