httpd security Tips (Centos6,7,8)
1. /etc/httpd/conf/httpd.conf の DocumentRootの直前ぐらいに以下を追記する
ServerTokens Prod ServerSignature Off TraceEnable Off # httproxy RequestHeader unset Proxy Header unset X-Powered-By # Click Jack Header append X-FRAME-OPTIONS "SAMEORIGIN" # XSS Header set X-XSS-Protection "1; mode=block" Header set X-Content-Type-Options nosniff #
2. /etc/httpd/conf.d/ssl.conf 中、SSLCipherSuite のところは
https://mozilla.github.io/server-side-tls/ssl-config-generator/
に httpd の version と openssl のversion を入力すると suggestionが出てくるのでそれをコピペする。例えば CentOS 8.0.1905 の場合は
httpd-2.4.37 openssl-1.1.1
なので上記を入れると https://ssl-config.mozilla.org/#server=apache&server-version=2.4.37&config=intermediate&openssl-version=1.1.1 となる。