Dear Steve dear all,
I found this guide https://www.wpbeginner.com/wp-tutorials/how-to-add-ssl-and-https-in-wordpress/ and I followed it to configure my
website that was already functioning without SSL.
The first thing I did was install of letsencrypt
using certbot-auto generating: private, the request and the
certificate. This utility did not make any changes to
the apache configuration because I did it myself.
If you still have some time for me I would be grateful. These
are some configuration files of the linux server running apache 2.2.
/etc/httpd/conf/httpd.conf:
… omissis
ServerRoot “/ etc / httpd”
….
Listen 80
….
#ServerName https://www.example.com:80
UseCanonicalName Off
DocumentRoot “/ var / www / html”
<Directory “/ var / www / html”>
… omissis
inside this file there are no references for wordpress.
The file /etc/httpd/conf.d/ssl.conf is:
LoadModule ssl_module modules / mod_ssl.so
#
# When we also provide SSL we have to listen to the
# the HTTPS port in addition.
#
Listen 443
….
<VirtualHost _default_: 443>
# General setup for the virtual host, inherited from global configuration
#DocumentRoot “/ var / www / html”
#ServerName https://www.example.com:443
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/atleticaumbertide.it/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/atleticaumbertide.it/privkey.pem
…
</ VirtualHost>
And the configuration file /var/www/html/.htaccess in the wordpress directory:
# BEGIN iThemes Security – Do not modify or remove this line
# iThemes Security Config Details: 2
# Quick ban IP. Will be updated on next formal rules save.
SetEnvIF REMOTE_ADDR “^185\.13\.39\.246$” DenyAccess
SetEnvIF X-FORWARDED-FOR “^185\.13\.39\.246$” DenyAccess
SetEnvIF X-CLUSTER-CLIENT-IP “^185\.13\.39\.246$” DenyAccess
<IfModule mod_authz_core.c>
<RequireAll>
Require all granted
Require not env DenyAccess
Require not ip 185.13.39.246
</RequireAll>
</IfModule>
…omissis….
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
…omissis….
And the last one wp-config.php:
….
define(‘WP_HOME’,’https://atleticaumbertide.it’);
define(‘WP_SITEURL’,’https://atleticaumbertide.it’);
…..
define(‘FORCE_SSL_ADMIN’, true);
So if I replace “RewriteBase” standard rules from .htaccess adding the new
entry:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yoursite.com/$1 [R,L]
</IfModule>
web site will be not accesible.
Any ideas ?
Thanks a lot
Best Regards
Willy
-
This reply was modified 6 years, 10 months ago by
willy70.