Rocky 9.x Installing lets-encrypt SSL certificate

From Notes_Wiki
Revision as of 10:02, 5 October 2022 by Saurabh (talk | contribs) (Created page with "Home > Rocky Linux or CentOS > Rocky Linux 9.x > Rocky 9.x Apache web server configuration > Rocky 9.x Installing lets-encrypt SSL certificate To install lets-encrypt certificate on a machine for use with apache (httpd) use: # dnf -y install epel-release mod_ssl # dnf -y install certbot python3-certbot-apache # certbot apache mode works only when NameVirtualHost is enabled and appropriate VirtualHost are created in apache. If this is not p...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Home > Rocky Linux or CentOS > Rocky Linux 9.x > Rocky 9.x Apache web server configuration > Rocky 9.x Installing lets-encrypt SSL certificate

To install lets-encrypt certificate on a machine for use with apache (httpd) use:

  1. dnf -y install epel-release mod_ssl
  2. dnf -y install certbot python3-certbot-apache
  3. certbot apache mode works only when NameVirtualHost is enabled and appropriate VirtualHost are created in apache. If this is not present then add configuration similar to below in '/etc/httpd/conf/httpd.conf' at bottom:
    NameVirtualHost *:80
    
    <VirtualHost *:80>
        ServerAdmin saurabh@sbarjatiya.com
        DocumentRoot /var/www/html
        ServerName server.example.com
        ErrorLog logs/server.example.com-error_log
        CustomLog logs/server.example.com-access_log combined
    </VirtualHost>
    
  4. Then request certificate via:
    certbot --apache
    We may have to give email address, accept agreement and optionally agree to share details.
    After that we need to select virtualhosts for which we want to request TLS certificate.

Refer:


There are older articles on this at:


Home > Rocky Linux or CentOS > Rocky Linux 9.x > Rocky 9.x Apache web server configuration > Rocky 9.x Installing lets-encrypt SSL certificate