Certbot with Apache

wiki.TerraBase.info
Revision as of 21:10, 29 December 2019 by Root (talk | contribs)
Jump to navigation Jump to search

The environment for the following examples is: CentOS 7 and Apache

Simple Example (Interactive): certbot --apache


Both of the above examples will do the following;

  • Modifies the /etc/http/conf/httpd.conf file by adding several items with several "Rewrites" to the VirtualHost section for the web site;

RewriteEngine on

RewriteCond %{SERVER_NAME} =WhateEverWebSiteName [OR]

RewriteCond %{SERVER_NAME} =WhateEverWebSiteName

RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

  • an Include: Include /etc/httpd/conf/httpd-le-ssl.conf

Include /etc/httpd/conf/httpd-le-ssl.conf