Add security hardening for shared hosting environments

Improve session cookie security with HttpOnly and SameSite attributes
Add security headers via .htaccess
Block direct access to sensitive files
Restrict allowed HTTP methods
Document cPanel-specific security configuration
Add container hardening for ServerTokens and ServerSignature
This commit is contained in:
Ruben 2026-02-10 23:02:57 +01:00
parent f2dc4ec647
commit 3b04a3d78c
6 changed files with 121 additions and 2 deletions

View file

@ -1,5 +1,13 @@
# Minimize server version disclosure
ServerTokens Prod
# Disable PHP version header and error display
php_flag expose_php Off
php_flag display_errors Off
php_flag log_errors On
<Directory /var/www/>
Options Indexes FollowSymLinks
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>