There are a number of considerations you have in the https configuration file. A great guide for options and other considerations.
Let us create a place to securely hold the Public/Private Keys and Certificates
cd /etc/apache2
mkdir ssl
chmod 644 ssl/
cd ssl/
openssl list -public-key-algorithms
openssl ecparam -list_curves
With Perfect Forward Secrecy (PFS), if an attacker gets a hold of the server's private key, it will not be able to decrypt past communications. The private key is only used to sign the DH handshake, which does not reveal the pre-master key. Diffie-Hellman ensures that the pre-master keys never leave the client and the server, and cannot be intercepted by a Man in the Middle attack (MiTM).
BTW - This procedure will take some time. Generating the DH Parameters puts a HUGE load on the server, so keep this in mind!
We here at Zombie suggest 4096 bit (2048 bit is the minimum) but we use 8192 bit which takes a significant amount of time to create. Unless you really need 8192, use 4096 bit.
openssl dhparam -out dhparam.pem 4096
chmod 640 *.pem
openssl ecparam -name secp521r1 -out secp521r1.pem
openssl ecparam -name secp384r1 -out secp384r1.pem
openssl ecparam -in secp384r1.pem -check
openssl ecparam -in secp384r1.pem -genkey -noout -out secp384r1.key
openssl ecparam -name secp384r1 -noout -out secp384r1.key -genkey
chmod 640 *.pem
openssl ecparam -in secp384r1.pem -noout -text
openssl genpkey -algorithm X25519 -out X25519.key
openssl genpkey -algorithm X448 -out X448.key
chmod 640 *.key
mkdir zombiesecured
chmod 644 zombiesecured/
cd zombiesecured/
chmod 640 ssl/*.key
chmod 644 ssl/*.crt
Add the blue lines below
nano /etc/apache2/mods-available/ssl.conf
<IfModule mod_ssl.c>
SSLRandomSeed startup builtin
SSLRandomSeed startup file:/dev/urandom 512
SSLRandomSeed connect builtin
SSLRandomSeed connect file:/dev/urandom 512
SSLOpenSSLConfCmd Options -SessionTicket <--- We do not want clients connecting with older tickets, but instead initiate a full handshake
SSLCompression off <--- Prevents Crime Attack but it should be disabled in Apache2 with the latest version
SSLOpenSSLConfCmd DHParameters "/etc/apache2/ssl/dhparam.pem" <--- Helps to speed the random generation, increase DH key strength and handshake process
SSLOpenSSLConfCmd ECDHParameters secp384r1 <--- secp521r1:secp384r1....
SSLOpenSSLConfCmd Curves secp521r1:x448:x25519:secp384r1 <--- These are the curves you are willing to accept in order of preference... add any other supported curves you desire
#SSLFLIPS on <--- use if required for FIPS 140-2 (Top Secret) - Do not forget the applicable policy
............................
</IfModule>
A copy & paste version is found below:
SSLOpenSSLConfCmd Options -SessionTicket
SSLCompression off
SSLOpenSSLConfCmd DHParameters "/etc/apache2/ssl/dhparam.pem"
SSLOpenSSLConfCmd ECDHParameters secp384r1
SSLOpenSSLConfCmd Curves secp521r1:x448:x22519:secp384r1:prime256v1:prime192v1
#SSLFLIPS on
Add the blue lines below
nano /etc/apache2/sites-available/EXAMPLE_com_ssl.conf
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin host@EXAMPLE.com
ServerName EXAMPLE.com
ServerAlias www.EXAMPLE.com
DocumentRoot /var/www/html/EXAMPLE
DirectoryIndex index.html
LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLOpenSSLConfCmd Options -SessionTicket
SSLCompression off
SSLOpenSSLConfCmd DHParameters "/etc/apache2/ssl/dhparam.pem"
SSLOpenSSLConfCmd ECDHParameters secp384r1
SSLOpenSSLConfCmd Curves secp521r1:x448:x25519:secp384r1
#SSLFLIPS on
........................
</VirtualHost>
</IfModule>
A copy & paste version is found below:
SSLOpenSSLConfCmd Options -SessionTicket
SSLCompression off
SSLOpenSSLConfCmd DHParameters "/etc/apache2/ssl/dhparam.pem"
SSLOpenSSLConfCmd ECDHParameters secp384r1
SSLOpenSSLConfCmd Curves secp521r1:x448:x22519:secp384r1:prime256v1:prime192v1
#SSLFLIPS on