Servers • Web

Web Server Configuration (nginx & Apache)

By MDToolsOne •
Web server configuration

Proper web server configuration improves security, performance, and reliability. Below are recommended settings for both nginx and Apache.

SSL/TLS best practices

  • Use strong ciphers and TLS 1.2+ (prefer 1.3).
  • Enable HSTS with a reasonable max-age after testing.
  • Use automated certificate management (Let's Encrypt + Certbot).

Performance tweaks

Enable gzip/brotli compression, tune worker processes, and use caching headers for static assets. Use upstreams and keepalive for proxying to apps.

Example (nginx gzip)

gzip on;
gzip_types text/plain application/json text/css application/javascript;
gzip_min_length 1024;
MD Tools