Difference between revisions of "Rocky 9.x Installing lets-encrypt SSL certificate"

From Notes_Wiki
(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...")
 
m
Line 1: Line 1:
[[Main Page|Home]] > [[Rocky Linux or CentOS]] > [[Rocky Linux 9.x]] > [[Rocky 9.x Apache web server configuration]] > [[Rocky 9.x Installing lets-encrypt SSL certificate]]
[[Main Page|Home]] > [[Rocky Linux or CentOS]] > [[Rocky Linux 9.x]] > [[Rocky 9.x Web servers]] > [[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:
To install lets-encrypt certificate on a machine for use with apache (httpd) use:
Line 32: Line 32:




[[Main Page|Home]] > [[Rocky Linux or CentOS]] > [[Rocky Linux 9.x]] > [[Rocky 9.x Apache web server configuration]] > [[Rocky 9.x Installing lets-encrypt SSL certificate]]
[[Main Page|Home]] > [[Rocky Linux or CentOS]] > [[Rocky Linux 9.x]] > [[Rocky 9.x Web servers]] > [[Rocky 9.x Apache web server configuration]] > [[Rocky 9.x Installing lets-encrypt SSL certificate]]

Revision as of 06:20, 7 October 2022

Home > Rocky Linux or CentOS > Rocky Linux 9.x > Rocky 9.x Web servers > 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 Web servers > Rocky 9.x Apache web server configuration > Rocky 9.x Installing lets-encrypt SSL certificate