0

I am trying to install a Let's Encrypt SSL certificate to my website using Securing Apache with Let's Encrypt on CentOS 7.

My web server is (include version): Apache (cPanel)

My hosting provider is: GoDaddy

followed this link for that and STEP-1 and STEP-2 were successful

with the understanding that no firewall has been setup in my VPS

sudo yum install epel-release
sudo yum install httpd mod_ssl python-certbot-apache
sudo systemctl start httpd
systemctl status httpd
curl www.example.com ((Note: works))       
sudo certbot --apache -d example.com -d www.example.com

This last command generates an error, as follows:

sudo: certbot: command not found

I tried to install certbot by

sudo yum install certbot

and installed successfully

  Installed:
  certbot.noarch 0:0.27.1-1.el7

Dependency Installed:
  audit-libs-python.x86_64 0:2.8.1-3.el7_5.1         checkpolicy.x86_64 0:2.5-6.el7                       libcgroup.x86_64 0:0.41-15.el7
  libsemanage-python.x86_64 0:2.5-11.el7             policycoreutils-python.x86_64 0:2.5-22.el7           pyOpenSSL.x86_64 0:0.13.1-3.el7
  python-IPy.noarch 0:0.75-6.el7                     python-cffi.x86_64 0:1.6.0-5.el7                     python-enum34.noarch 0:1.0.4-1.el7
  python-idna.noarch 0:2.4-1.el7                     python-ndg_httpsclient.noarch 0:0.3.2-1.el7          python-ply.noarch 0:3.4-11.el7
  python-pycparser.noarch 0:2.14-1.el7               python-requests.noarch 0:2.6.0-1.el7_1               python-requests-toolbelt.noarch 0:0.8.0-1.el7
  python-six.noarch 0:1.9.0-2.el7                    python-urllib3.noarch 0:1.10.2-5.el7                 python-zope-component.noarch 1:4.1.0-3.el7
  python-zope-event.noarch 0:4.0.3-2.el7             python-zope-interface.x86_64 0:4.0.5-4.el7           python2-acme.noarch 0:0.27.1-1.el7
  python2-certbot.noarch 0:0.27.1-1.el7              python2-configargparse.noarch 0:0.11.0-1.el7         python2-cryptography.x86_64 0:1.7.2-2.el7
  python2-future.noarch 0:0.16.0-6.el7               python2-josepy.noarch 0:1.1.0-1.el7                  python2-mock.noarch 0:1.0.1-9.el7
  python2-parsedatetime.noarch 0:2.4-5.el7           python2-pyasn1.noarch 0:0.1.9-7.el7                  python2-pyrfc3339.noarch 0:1.0-2.el7
  python2-requests.noarch 0:2.6.0-0.el7              python2-six.noarch 0:1.9.0-0.el7                     pytz.noarch 0:2016.10-2.el7
  setools-libs.x86_64 0:3.3.8-2.el7

Complete!

I again tried to request an SSL certificate for my domain.

   sudo certbot --apache -d example.com -d www.example.com

this time it's returning

   Saving debug log to /var/log/letsencrypt/letsencrypt.log
   The requested apache plugin does not appear to be installed

/var/log/letsencrypt/letsencrypt.log

    2018-11-02 08:15:55,542:DEBUG:certbot.main:certbot version: 0.27.1
    2018-11-02 08:15:55,542:DEBUG:certbot.main:Arguments: ['--apache', '-d', 'example.com', '-d', 'www.example.com']
    2018-11-02 08:15:55,543:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#manual,PluginEntryPoint#null,PluginEntryPoint#standalone,Plugi$
    2018-11-02 08:15:55,611:DEBUG:certbot.log:Root logging level set at 20
    2018-11-02 08:15:55,611:INFO:certbot.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log
    2018-11-02 08:15:55,613:DEBUG:certbot.plugins.selection:Requested authenticator apache and installer apache
    2018-11-02 08:15:55,613:DEBUG:certbot.plugins.selection:No candidate plugin
    2018-11-02 08:15:55,614:DEBUG:certbot.plugins.selection:Selected authenticator None and installer None

Note: I replaced example.com with my actual domain

UPDATE 1

I tried with

  sudo yum install python-certbot-apache

it is returning

  --> Finished Dependency Resolution
  Error: Package: python2-certbot-apache-0.27.1-1.el7.noarch (epel)
       Requires: mod_ssl
  You could try using --skip-broken to work around the problem
   You could try running: rpm -Va --nofiles --nodigest
  • This URL lists the package name as 'python2-certbot-apache' instead of 'python-certbot-apache' as specified in the question. Maybe you have the wrong package? – Haxiel Nov 2 '18 at 13:22
  • @RubberStamp, Thank you for the Quick Response. I'm not sure how to activate the plugin a2enmod. Can you please let me know that? – current_user Nov 2 '18 at 13:38
  • @Haxiel, Thank you for the quick response.I tried with "sudo yum install python-certbot-apache" as you have suggested and update the result in the question .Please check and let me know what to do now. – current_user Nov 2 '18 at 13:40
  • Sorry... my comment was incorrect.... the "certbot-apache" plugin seems to enable automatic settings within an apache configuration. The Debian package comes with a Centos configuration template which is stored at /usr/lib/python2.7/dist-packages/certbot_apache/centos-options-ssl-apache.conf on my installation. Sorry about the confusion... I usually shut down all webservices for the few seconds it takes to update the certs using the built in webserver... try running certbot without the --apache option and add the --dry-run option to see if things work. – RubberStamp Nov 2 '18 at 13:58
  • 1
    If cPanel still works the same as the last time I used it, it compiles its own Apache from source (they call it EasyApache) and the certbot Apache automatic configuration plugin packaged for CentOS will probably not work with EadyApache. It looks like cPanel has their own plugin to enable Lets Encrypt. – GracefulRestart Nov 2 '18 at 17:49
2
+50

What's the problem with doing this?:

sudo yum install mod_ssl

sudo a2enmod ssl

(restart apache then)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.