Certbot with Apache: Difference between revisions

No edit summary
No edit summary
Line 9: Line 9:
*Modifies the /etc/http/conf/httpd.conf file by adding several items with several "Rewrites" to the VirtualHost section for the web site;
*Modifies the /etc/http/conf/httpd.conf file by adding several items with several "Rewrites" to the VirtualHost section for the web site;
<blockquote>RewriteEngine on</blockquote><blockquote>RewriteCond %{SERVER_NAME} =WhateEverWebSiteName [OR]</blockquote><blockquote>RewriteCond %{SERVER_NAME} =WhateEverWebSiteName </blockquote><blockquote>RewriteRule ^ <nowiki>https://%{SERVER_NAME}%{REQUEST_URI}</nowiki> [END,NE,R=permanent]</blockquote>
<blockquote>RewriteEngine on</blockquote><blockquote>RewriteCond %{SERVER_NAME} =WhateEverWebSiteName [OR]</blockquote><blockquote>RewriteCond %{SERVER_NAME} =WhateEverWebSiteName </blockquote><blockquote>RewriteRule ^ <nowiki>https://%{SERVER_NAME}%{REQUEST_URI}</nowiki> [END,NE,R=permanent]</blockquote>
*an Include: Include /etc/httpd/conf/httpd-le-ssl.conf
*an Include: Include /etc/httpd/conf/httpd-le-ssl.conf
<blockquote>Include /etc/httpd/conf/httpd-le-ssl.conf</blockquote>
<blockquote>Include /etc/httpd/conf/httpd-le-ssl.conf</blockquote><IfModule mod_ssl.c>
 
<VirtualHost *:443>
 
   DocumentRoot /var/www/html/AstoundingPublications.com
 
   ServerName www.AstoundingPublications.com
 
   CustomLog "logs/AstoundingPublications.com/www.Access.LOG" combinedio
 
   <Directory "/var/www/html/AstoundingPublications.com">
 
       AllowOverride ALL
 
       Require all granted
 
   </Directory>
 
       
 
ServerAlias www.astoundingpublications.com
 
SSLCertificateFile /etc/letsencrypt/live/www.astoundingpublications.com/cert.pem
 
SSLCertificateKeyFile /etc/letsencrypt/live/www.astoundingpublications.com/privkey.pem
 
Include /etc/letsencrypt/options-ssl-apache.conf
 
SSLCertificateChainFile /etc/letsencrypt/live/www.astoundingpublications.com/chain.pem
 
</VirtualHost>
 
</IfModule>