Deploy ASP.NET Core on Linux with Kestrel, systemd and Nginx
Publish an ASP.NET Core app, run it on Kestrel as a systemd service, configure forwarded headers, put Nginx in front with HTTPS, and deploy updates safely.
Blog
Stacks, databases, deployment and marketing for websites you host yourself.
Publish an ASP.NET Core app, run it on Kestrel as a systemd service, configure forwarded headers, put Nginx in front with HTTPS, and deploy updates safely.
Diagnose Nginx 502 Bad Gateway: read the error log, fix PHP-FPM sockets, crashed or wrong-port upstreams, Docker, SELinux and buffer sizes.
Host subdomains on one VPS with Nginx: DNS records, a server block per subdomain, app proxying, HTTPS with Certbot, wildcards, and a catch-all default.
How Nginx try_files works: files and directories in order, fallbacks to a URI or status, front controllers, single-page apps and pitfalls.
Install Apache Tomcat 10 or 11 on Ubuntu from the official tarball, create a systemd service, secure the manager, deploy WARs and add Nginx.
Install the Apache web server on Ubuntu, open the firewall, learn the config layout and a2en* tools, add a site, enable modules and fix common errors.
Protect a site, folder or admin tool with Nginx basic auth: htpasswd users, locations, IP allow-lists, excluded paths and security tips.
Pick a canonical domain and 301-redirect the other: Nginx and Apache configs, certificates for both names, Cloudflare rules, app URLs, and curl tests.
Set up Nginx FastCGI cache for PHP sites: cache zones, keys, bypass rules for logged-in users and carts, cache status headers, purging and microcaching.
Redirect HTTP to HTTPS in Nginx with a clean 301, pick www or non-www, keep ACME challenges working and avoid redirect loops behind proxies.
Permanent vs temporary redirects explained: 301, 302, 307, 308 and 410, their SEO impact, Nginx and Apache examples, redirect chains, and how to test them.
Compare static and dynamic websites on speed, security, cost and editing, understand hybrid approaches, and pick the right one for your project.
How web apps are built: client, web server, app server, database, cache, queues and storage, and how the setup evolves from one VPS to many servers.
Install Node.js and npm on Ubuntu via the Ubuntu repository, the NodeSource repository or nvm — which to choose for servers, and how to upgrade safely.
What a CDN does for a VPS-hosted site, when it helps, how to set one up, caching rules, origin protection, real visitor IPs and common pitfalls.
Monoliths, modular monoliths and microservices compared: deployment, scaling, data, team size, operating cost, VPS hosting, and when to split a service.
Check a site's backlink history: new and lost links over time, tools, reading growth charts, spotting spam, vetting domains before buying, and disavow.
Install and enable PHP extensions with apt or dnf, find what an app needs, use phpenmod, add PECL extensions like Redis, and verify them.
Speed up Apache on a VPS: event MPM with PHP-FPM, workers sized to RAM, KeepAlive, unused modules, .htaccess lookups and caching.
How Nginx chooses a location block: exact, prefix, ^~ and regex matches, evaluation order, try_files, nested locations, and practical patterns for real sites.
Make websites faster from the server side: location and TTFB, HTTP/2 and TLS, compression, caching layers, PHP and database tuning, images.
Configure Nginx rate limiting with limit_req and limit_conn: zones, burst and nodelay, per-location limits, whitelisting, custom 429 responses and testing.
Find and read Nginx logs, add timings and upstream data to the log format, log per site, use JSON logs, rotate them and analyse traffic fast.
Set up Ruby for Rails on Ubuntu: build dependencies, install Ruby with rbenv or mise, Bundler, create a Rails app with PostgreSQL, and prepare for production.