Hi endstationStgt,
the fastest way would be the usage of the Plesk "
sslmng - utility", with the following commands:
For NGINX:
Code:
plesk sbin sslmng --services=nginx --custom --ciphers='EECDH+AESGCM+AES128:EECDH+AESGCM+AES256:EECDH+CHACHA20:EDH+AESGCM+AES128:EDH+AESGCM+AES256:EDH+CHACHA20' --protocols='TLSv1 TLSv1.1 TLSv1.2'
... where you should define your own ciphers, according to your needs and according to your configuration: =>
https://mozilla.github.io/server-side-tls/ssl-config-generator/
Afterwards, you will notice, that you now have an additional nginx - configuration file, located at "/etc/nginx/conf.d/
ssl.conf", with your defined configuration.
For apache:
The next step is to create another "ssl.conf" - file, but this time, you will do this for
apache:
Code:
plesk sbin sslmng --services=apache --custom --ciphers='EECDH+AESGCM+AES128:EECDH+AESGCM+AES256:EECDH+CHACHA20:EDH+AESGCM+AES128:EDH+AESGCM+AES256:EDH+CHACHA20' --protocols='All -SSLv2 -SSLv3'
Pls. use the same ciphers, as you used for nginx.
You will now have a new additional apache - configuration file, located at ".../conf.d/ssl.conf" ( where ".../" differs between
Debian/Ubuntu - based systems
( => "/etc/apache2/" ) and
CentOS/RHEL - based systems
( => "/etc/httpd/" ) ), with your defined configuration.
Last step to achieve your requested goal:
To avoid double "X-Header" loads, when you use apache and nginx together, you will now add
only at the ssl - apache2 - configuration file your
HSTS - modifications, as for example:
Add
at the end of your existing configuration "
../conf.d/ssl.conf" :
Code:
Header set X-Frame-Options SAMEORIGIN
Header set X-XSS-Protection "1; mode=block"
Header set X-Content-Type-Options "nosniff"
Header add Strict-Transport-Security "max-age=15768000;includeSubDomains;preload"
Finally, pls. restart apache and nginx and check your configuration as for example at "
https://www.ssllabs.com/ssltest/index.html" or without any security - checks, just check your headers at "
http://web-sniffer.net/".