Choosing Your Server

Even if you deploy to a static host, you need a web server on your own computer while you develop: browsers restrict many APIs on pages opened as file:// URLs, and anything with a back end (PHP, a Node.js 2,131 API, a Django 7,143 or Rails 14,565 app, a database) needs a running server process. Running it locally gives you control of the whole platform and no upload step between editing and testing.

For production you can run the same stack on a rented virtual machine from a cloud provider (Web Hosts), which gives you high bandwidth, low latency and the option to add machines behind a load balancer as traffic grows, all billed by the hour instead of bought up front.

Web servers measured by W3Techs 13,241 on September 14, 2026 (a site can use more than one)
Rank Web server Share of websites May 2021
1 nginx 75 31.0% 33.8%
2 Cloudflare 2 Server 30.6% 18.4%
3 Apache 22.0% 33.8%
4 LiteSpeed 17,276 14.6% 8.5%
5 Node.js 7.2% 1.2%
6 Microsoft IIS 25,490 3.0% 7.0%
7 Caddy 7,400 1.0% not listed

The table measures the server that answers the public request. Cloudflare Server is Cloudflare's CDN and reverse proxy rather than software you install; it now fronts almost a third of all sites. nginx is a web server that also works as a reverse proxy, load balancer and HTTP cache. LiteSpeed is a drop-in Apache replacement that loads Apache configuration and .htaccess files directly. Caddy, known for obtaining HTTPS certificates automatically (Securing with HTTPS), has entered the list.

On the language side, PHP still runs 69.9% of the websites whose server-side language W3Techs can detect (down from 79.2% in 2021), followed by JavaScript (7.5%), Ruby (7.1%), Java (5.4%) and ASP.NET 6 (4.2%). Developers report different habits: Node.js (48.7%) tops the Stack Overflow Developer Survey 2025 web-framework list.

The subsections that follow set up one stack each; you need only one. Whichever you choose, check that its port is free (80 for a system web server, 3000, 5173 or 8000 for development servers) and allow it through your firewall only if other devices must connect.

Subsections