PHP-012 / Beginner
Web-accessible .env file under the document root
Why is this a problem?
DB passwords and API keys are exposed over HTTP.
How to fix it
nginx
root /var/www/app/public; # Expose only public; keep .env in the parent directory
location ~ /\.(?!well-known) { deny all; }