To gain a faster page loading, you can enable the client side caching. That means that the browser of the connecting clients is storing the contents of your page until it expires.
Therefore you have to add the following under your virtual host entry (right before </VirtualHost>)
After that run the following as root:
Also if you want to redirect all http traffic to https you should use HTTP Response code 301 instead of 302. This is something that is nearly everywhere you look for http to https redirects missing ("R=301").
To accomplish this you simply have to replace "<VirtualHost *>" at the beginning of your website configuration file (replace server names ;-) ) with:
Also you should use the ServerName attribute and avoid using "" for convenience and later usage.
Configuring https is as simple. First you have to get your certificate use startssl or lets encrypt.
After you have managed to get your certificate for (www.example.org; don't miss typing the www subdomain ;-) ) place the files in the following directory:
The Private key: /etc/ssl/private/example.org.key
The Certificate File: /etc/ssl/certs/example.org.crt
The Intermediate Certificates File (e.g. lets encrypt or sub.class1.server.ca.pem):
/etc/ssl/certs/letsencryptauthorityx1.pem
/etc/ssl/certs/sub.class1.server.ca.pem
After the files are there you have to add some text to your VirtualHost configuration section
As soon as WordPress stops using inline scripts, inline styles, fonts as "data:" urls and also images as "data:" urls, the line:
can be changed to the more secure