Store PHP Sessions in Redis (for Speed and Multiple Servers)
Move PHP sessions from files to Redis: load balancing and speed, php-redis install, php.ini settings, locking, Laravel and WordPress notes, and security.
Blog
Stacks, databases, deployment and marketing for websites you host yourself.
Move PHP sessions from files to Redis: load balancing and speed, php-redis install, php.ini settings, locking, Laravel and WordPress notes, and security.
Send password resets and receipts reliably: own mail server vs a service, Amazon SES, Postmark, SendGrid, Mailgun and Brevo, plus SMTP or API setup.
Put Varnish in front of your app with Nginx for TLS: install, backends and VCL rules, cookies and logged-in users, purging and when to skip it.
Proxy WebSocket connections through Nginx: Upgrade and Connection headers, the map pattern, timeouts, sticky load balancing and debugging.
Run GlitchTip on a small VPS with Docker Compose: requirements, settings, Nginx and HTTPS, first project and DSN, Sentry SDK setup, alerts and backups.
Understand Apache mod_rewrite: RewriteRule syntax, RewriteCond tests, flags like L, R, NC and QSA, back-references, context and debugging.
Turn a Python script, bot or web app into a reliable systemd service: virtualenv paths, unbuffered output, environment files, restarts, hardening and timers.
Secure an Express API: helmet headers, trust proxy behind Nginx, rate limits, input validation, CORS, secure cookies, safe errors, audits, non-root.
Set CORS headers in Nginx correctly: allowed origins with a map, preflight OPTIONS handling, credentials, exposed headers and duplicate headers.
A practical guide to HTTP status codes: 2xx success, 3xx redirects, 4xx client errors and 5xx server errors, with common causes and fixes.
The server side of technical SEO: uptime, TTFB, HTTPS, status codes, redirects, canonical hosts, robots.txt, sitemaps, crawl budget, logs and server location.
Install Nginx, MariaDB and PHP 8.3-FPM on Ubuntu 24.04: secure the database, configure an Nginx server block for PHP, test, add HTTPS, and tune the basics.
Deploy a Django project to an Ubuntu VPS: PostgreSQL, virtualenv, production settings, collectstatic, Gunicorn as a systemd service, Nginx and HTTPS.
Get the Python version you need on Ubuntu: use the system Python, add versions from deadsnakes, build with pyenv or install with uv — without breaking the OS.
Diagnose Node.js memory leaks: heap vs RSS, --max-old-space-size, heap snapshots and Chrome DevTools comparison, common leak causes, and safe stopgaps.
How webhooks work and how to receive them safely: signature checks, fast responses with queued processing, retries, idempotency and testing.
Use Apache mod_proxy to put Node, Python or Docker apps behind your domain: ProxyPass, headers, HTTPS, WebSockets and load balancing.
Run a Flask app in production on Ubuntu: virtualenv, Gunicorn workers, a systemd service, Nginx reverse proxy, HTTPS and zero-downtime reloads.
Create and use Python virtual environments with venv: activate, install and freeze requirements, use them in systemd and cron, and when to use pipx or uv.
Issue and renew free SSL certificates with acme.sh: choose a CA, webroot and DNS API validation, wildcards, installing into Nginx, auto-renewal.
Run Apache with the event MPM and PHP-FPM: migrate from mod_php, give each virtual host its own pool, run several PHP versions side by side.
Background jobs for web apps: queues, workers and brokers, Redis vs RabbitMQ, retries and idempotency, tools for PHP, Python and Node, and running workers.
Set Nginx caching headers for CSS, JS, images and fonts: expires, Cache-Control, immutable assets, HTML revalidation, ETags and testing.
Build an Angular app for production and serve it with Nginx: dist/browser output, routing fallback, base href, runtime config and caching.