26 lines
10 KiB
JSON
26 lines
10 KiB
JSON
{
|
|
"schema_version": 1,
|
|
"saved_at": "2026-08-07T04:16:01.9205884Z",
|
|
"content_sha256": "bfa1b06d0e231f1101c04d7369d69d09e54d41968a3da5e01617279907b0d682",
|
|
"result": {
|
|
"title": "Apache TLS/SSL Configuration Guide - GoodTLS",
|
|
"url": "https://goodtls.com/apache",
|
|
"snippet": "Recommended secure TLS/SSL configuration for the Apache HTTP Server with mod_ssl, covering protocols, cipher suites, OCSP stapling, HSTS, and certificate setup.",
|
|
"content": "Last updated: 2026-06-25\n\nApache TLS/SSL Configuration Guide\n\nThis guide provides recommended TLS/SSL settings for the Apache HTTP Server using mod_ssl . These settings are designed to achieve an A+ rating on Qualys SSL Labs while maintaining compatibility with modern clients.\n\nPrerequisites #\n\nApache 2.4.43 or later (for SSLCipherSuite TLSv1.3 syntax)\n\nmod_ssl and mod_headers enabled\n\nOpenSSL 1.1.1 or later\n\nA valid SSL/TLS certificate from a trusted CA\n\nEnsure the required modules are loaded:\n\nLoadModule ssl_module modules/mod_ssl.so\nLoadModule headers_module modules/mod_headers.so\nLoadModule socache_shmcb_module modules/mod_socache_shmcb.so\n\nProtocol Versions #\n\nDisable all legacy protocols and allow only TLS 1.2 and TLS 1.3:\n\nSSLProtocol -all +TLSv1.2 +TLSv1.3\n\nCipher Suites #\n\nUse only AEAD cipher suites with ECDHE key exchange for forward secrecy. Apache 2.4.43+ supports separate cipher configuration for TLS 1.2 and TLS 1.3:\n\nSSLCipherSuite ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305\nSSLCipherSuite TLSv1.3 TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256\n\nNote: On Apache \u003c 2.4.43, the SSLCipherSuite TLSv1.3 directive is not recognized. Omit it; OpenSSL's TLS 1.3 cipher defaults are strong and apply automatically.\n\nSince all ciphers in the list are equally strong, server cipher order preference can be disabled:\n\nSSLHonorCipherOrder off\n\nCertificate Configuration #\n\nSSLCertificateFile /etc/httpd/ssl/fullchain.pem\nSSLCertificateKeyFile /etc/httpd/ssl/privkey.pem\n\nUse a full-chain certificate file that includes both the server certificate and intermediate CA certificates. The SSLCertificateChainFile directive was deprecated in Apache 2.4.8 and removed in later versions; SSLCertificateFile with a full-chain PEM replaces it.\n\nOn Debian/Ubuntu systems, paths are typically under /etc/apache2/ssl/ instead of /etc/httpd/ssl/ .\n\nSecurity Settings #\n\nExplicitly set SSL compression off (the default since 2.4.3, but worth stating) and disable session tickets for forward secrecy. Unlike nginx, Apache does not rotate session ticket keys automatically, so a static key persists until the next restart:\n\nSSLCompression off\nSSLSessionTickets off\n\nOCSP Stapling #\n\nEnable OCSP stapling to improve TLS handshake performance and user privacy. The stapling cache must be configured in the global server context (outside of any VirtualHost ):\n\nSSLUseStapling on\nSSLStaplingCache \"shmcb:logs/ssl_stapling(32768)\"\nSSLStaplingResponseMaxAge 900\n\nThe logs/ path is relative to ServerRoot . On RHEL/CentOS ( ServerRoot /etc/httpd ) it resolves via a symlink to /var/log/httpd/ . On Debian/Ubuntu ( ServerRoot /etc/apache2 ), use an absolute path like \"shmcb:/var/log/apache2/ssl_stapling(32768)\" instead.\n\nHTTP Strict Transport Security (HSTS) #\n\nAdd the HSTS header to force browsers to use HTTPS for all future connections:\n\nHeader always set Strict-Transport-Security \"max-age=63072000; includeSubDomains; preload\"\n\nOnly enable includeSubDomains if all subdomains support HTTPS. Only add preload if you intend to submit your domain to the HSTS preload list.\n\nHTTPS Redirect #\n\nRedirect all HTTP traffic to HTTPS:\n\n\u003cVirtualHost *:80\u003e\nServerName example.com\nRedirect permanent / https://example.com/\n\u003c/VirtualHost\u003e\n\nComplete Configuration Example #\n\nGlobal settings (in httpd.conf or ssl.conf ):\n\nSSLStaplingCache \"shmcb:logs/ssl_stapling(32768)\"\n\nVirtual host configuration:\n\n\u003cVirtualHost *:443\u003e\nServerName example.com\n\n# Enable SSL\nSSLEngine on\n\n# Certificates (Debian/Ubuntu: /etc/apache2/ssl/)\nSSLCertificateFile /etc/httpd/ssl/fullchain.pem\nSSLCertificateKeyFile /etc/httpd/ssl/privkey.pem\n\n# Protocols and ciphers\nSSLProtocol -all +TLSv1.2 +TLSv1.3\nSSLCipherSuite ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305\nSSLCipherSuite TLSv1.3 TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256\n# Note: On Apache \u003c 2.4.43, omit the SSLCipherSuite TLSv1.3 line;\n# OpenSSL's TLS 1.3 cipher defaults are strong and apply automatically.\nSSLHonorCipherOrder off\n\n# Security settings\nSSLCompression off\nSSLSessionTickets off\n\n# OCSP stapling\nSSLUseStapling on\nSSLStaplingResponseMaxAge 900\n\n# Security headers\nHeader always set Strict-Transport-Security \"max-age=63072000; includeSubDomains; preload\"\n\n# ... your site configuration\n\u003c/VirtualHost\u003e\n\nMutual TLS (mTLS) #\n\nStandard TLS authenticates only the server: the client verifies the server's certificate, but the server does not verify the client. Mutual TLS adds client authentication, requiring the connecting client to also present a certificate. This is an optional hardening step, not required for standard web deployments. It is most useful for internal APIs, admin endpoints, and service-to-service communication where you control all connecting clients.\n\nAdd the following to your VirtualHost block to require client certificates:\n\nSSLCACertificateFile /etc/httpd/ssl/client-ca.crt\nSSLVerifyClient require\nSSLVerifyDepth 2\n\nSSLCACertificateFile - CA certificate used to verify client certificates.\n\nSSLVerifyClient require - Require a valid client certificate. Connections without one are rejected.\n\nSSLVerifyClient optional - Request a client certificate but allow connections without one. Use %{SSL_CLIENT_VERIFY}e in access logs or per-location checks to inspect the result.\n\nSSLVerifyDepth - Maximum certificate chain depth. Set to 2 if client certs are issued by an intermediate CA.\n\nTo enforce mTLS on a specific path only:\n\n\u003cLocation /api/\u003e\nSSLVerifyClient require\nSSLCACertificateFile /etc/httpd/ssl/client-ca.crt\nSSLVerifyDepth 2\n\u003c/Location\u003e\n\nThe client certificate subject is available via the SSL_CLIENT_S_DN environment variable and can be forwarded to backend applications:\n\nRequestHeader set X-SSL-Client-DN \"%{SSL_CLIENT_S_DN}e\"\n\nSee RFC 8446 §4.3.2 for the TLS Certificate Request specification, and Wikipedia: Mutual authentication for a general overview.\n\nSecurity Notes #\n\nThe cipher suite and protocol configuration in this guide addresses the following known TLS vulnerabilities:\n\nPOODLE (CVE-2014-3566, 2014): SSL 3.0 is disabled. TLS_FALLBACK_SCSV was added in OpenSSL 1.0.1j / 1.0.2 (October 2014); SSL 3.0 disabled by default in OpenSSL 1.1.0 (August 2016).\n\nBEAST (CVE-2011-3389, 2011): Mitigated by recommending TLS 1.2 as the minimum; AEAD-only ciphers eliminate the CBC padding oracle.\n\nCRIME (CVE-2012-4929, 2012): TLS compression is off by default in OpenSSL 1.1.0+; do not enable it.\n\nLucky13 (2013): AEAD-only cipher list eliminates CBC padding timing side-channels entirely.\n\nFREAK (CVE-2015-0204, 2015): EXPORT-grade ciphers are excluded from the cipher string. Removed from OpenSSL 1.1.0 (August 2016).\n\nLOGJAM (CVE-2015-4000, 2015): Short-key DHE is excluded; only ECDHE key exchange is recommended.\n\nSweet32 (CVE-2016-2183, 2016): 3DES is excluded from the cipher string.\n\nROBOT (2017): Static RSA key exchange is excluded; only ECDHE is recommended.\n\nDowngrade attacks : TLS_FALLBACK_SCSV prevents protocol version rollback.\n\nRenegotiation injection (CVE-2009-3555, 2009): Secure renegotiation is enforced by default in OpenSSL 0.9.8m+; TLS 1.3 removes renegotiation entirely.\n\nThe following are not addressable through TLS configuration alone:\n\nHeartbleed (CVE-2014-0160, 2014): A memory disclosure bug in OpenSSL 1.0.1 through 1.0.1f. Fixed in OpenSSL 1.0.1g (April 7, 2014). Addressed by patching OpenSSL, not by TLS configuration.\n\nBREACH (CVE-2013-3587, 2013): Exploits HTTP-level response compression (gzip/deflate on responses). Mitigated at the application layer by disabling HTTP compression or using BREACH countermeasures; TLS configuration cannot prevent it.\n\nDROWN (CVE-2016-0800, 2016): Requires SSLv2 to be enabled on any server sharing the same private key. Ensure SSLv2 is disabled on all services that use the same certificate and key pair.\n\nVerification #\n\nTest your Apache configuration before restarting:\n\napachectl configtest\nsystemctl restart httpd\n\nOn Debian/Ubuntu:\n\napache2ctl configtest\nsystemctl restart apache2\n\nTest your configuration externally with the Mr.DNS SSL/TLS Certificate Check .\n\nRelated Guides\n\nNginx\n\nHigh-performance web server and reverse proxy.\n\nCaddy\n\nModern web server with automatic HTTPS.\n\nLighttpd\n\nLightweight and fast web server.\n\nTomcat\n\nJava servlet container and web server.\n\nView all Web Servers \u0026 Proxies guides →",
|
|
"content_type": "text/html",
|
|
"query": "What configuration parameters are required for Perfect Forward Secrecy in Apache HTTP Server?",
|
|
"language": "en-US",
|
|
"round": 3,
|
|
"fetched": true,
|
|
"relevant": true,
|
|
"relevance": 1,
|
|
"source_quality": "primary",
|
|
"source_quality_score": 0.904,
|
|
"actionable": true,
|
|
"covered_gap_ids": [
|
|
"G1"
|
|
],
|
|
"assessment_reason": "Die Quelle liefert konkrete, umsetzbare Konfigurationsparameter für Perfect Forward Secrecy in Apache HTTP Server, einschließlich der Einstellungen für SSLProtocol, SSLCipherSuite, SSLHonorCipherOrder, SSLCompression und SSLSessionTickets. Sie erklärt auch, wie die TLSv1.3-Konfiguration in Apache 2.4.43+ funktioniert und warnt vor Problemen bei älteren Versionen. Die Anweisungen sind direkt relevant und umsetzbar."
|
|
}
|
|
}
|