A web server with default settings is functional but not secure. This guide covers the practical hardening steps for Nginx and Apache (including LiteSpeed, which uses Apache-compatible configs) on a GoZen VPS. For platform-level protections, see GoZen Security.

These steps sit on top of your VPS security checklist and server hardening basics. If you haven’t done those yet, start there.

Hide Server Version Information

By default, web servers advertise their software and version in HTTP headers and error pages. Attackers use this to target known vulnerabilities.

Add Security Headers

Security headers tell browsers how to handle your content. These protect against cross-site scripting, clickjacking, and data injection attacks.

Verify Headers

After applying, test with:

  curl -I https://yourdomain.com
  

You should see all your security headers in the response.

Harden SSL/TLS Configuration

Default SSL settings often allow older, weaker protocols. Lock it down:

Test your SSL grade at SSL Labs – aim for an A or A+.

Block Access to Sensitive Files

Prevent access to dotfiles, backups, and configuration files that should never be served:

Disable Unnecessary HTTP Methods

Most websites only need GET, POST, and HEAD. Block the rest:

Rate Limiting

Protect against brute-force attacks and basic DDoS by limiting request rates:

Install ModSecurity (Web Application Firewall)

ModSecurity is an open-source WAF that filters malicious requests (SQL injection, XSS, path traversal):

Quick Checklist

Hardening StepStatus
Server version hidden
Security headers added
SSL/TLS hardened (A+ on SSL Labs)
Sensitive files blocked
Unnecessary HTTP methods disabled
Rate limiting on login endpoints
xmlrpc.php blocked (WordPress)
WAF active (ModSecurity or Cloudflare)

Last updated 19 Apr 2026, 23:46 +0300. history

Was this page helpful?