Skip to content
Back to blog

Apache VirtualHost Builder: How Patches to NCSA Became Apache

6 min read
Apache VirtualHost Builder: How Patches to NCSA Became Apache

Apache arrived in 1995, when the web was already growing quickly but server administration looked very different. There were no familiar cloud dashboards, automated TLS certificates, or ready-made reverse proxies in front of every application. Site operators ran one of a small number of HTTP servers, adapted it to their systems, and exchanged changes through email.

Apache HTTP Server grew directly from that practice. Its early history genuinely involved patches, but the project soon became more than a bundle of fixes applied to somebody else's code. Following the transition from NCSA httpd to an independent architecture also explains why a modern Apache configuration combines VirtualHost containers, loadable modules, and separate site files.

NCSA httpd and a server for the young web

In 1993, the National Center for Supercomputing Applications at the University of Illinois released NCSA httpd. Rob McCool was its primary author, while the same organization was developing Mosaic, one of the first widely adopted graphical browsers. NCSA httpd was not the first web server, but it became one of the most widely used and helped make publishing a website practical beyond the laboratories where the World Wide Web began.

Development of version 1.3 slowed after McCool left NCSA in mid-1994. Users continued to find bugs and add features they needed, so administrators accumulated their own incompatible patch sets. The central problem was no longer a lack of fixes. It was the lack of a shared place to coordinate, test, and release them as one distribution.

In February 1995, a small group of those users decided to coordinate their work. According to the HTTP Server Project's own history, Brian Behlendorf and Cliff Skolnick set up a mailing list, shared information space, and access to a development machine. Eight people formed the core of the Apache Group: Behlendorf, Roy Fielding, Rob Hartill, David Robinson, Skolnick, Randy Terbush, Robert Thau, and Andrew Wilson. Apache therefore did not have a sole creator in the sense that McCool had been the primary author of NCSA httpd.

How a patch collection became a separate server

The group used NCSA httpd 1.3 as its base, combined published fixes and useful extensions, and released Apache 0.6.2 in April 1995. This was the project's first official public release, but the developers already understood that they could not keep stacking patches on the old foundation indefinitely.

During the summer, Robert Thau designed a new architecture under the code name Shambhala. It introduced a modular structure, an extension API, memory pools, and an adaptive preforking process model. The team moved the early branch's features onto that foundation and released Apache 0.8.8 in August, followed by Apache 1.0 on December 1, 1995. The familiar description of Apache as a server made from patches captures the original coordination problem, but it no longer describes the architecture that emerged during the project's first year.

Apache passed NCSA httpd in the Netcraft survey less than a year after the group formed. In December 1996, Netcraft counted 247,419 Apache sites, representing 41 percent of its survey. There is no single universal date when that lead ended. Modern surveys report all sites, active sites, domains, web-facing computers, and the million busiest sites separately, and those measurements produce different rankings. Saying only that “Nginx overtook Apache” without a date and a defined population creates false precision.

Members of the Apache Group incorporated the Apache Software Foundation in June 1999. It provided a legal, financial, and organizational home for the HTTP server and later for many other open-source projects. The server itself retained the collaborative development model that had first formed around the mailing list.

Two accounts surrounding the Apache name

The name is often explained as an obvious pun: a patched server became a patchy server, and that became Apache. The story feels plausible because the first distribution really did collect patches to NCSA httpd, and versions of it have appeared even in the project's historical material.

The Apache Software Foundation's current history page gives a different account. It says Brian Behlendorf first used the name to show appreciation for the people and tribes who refer to themselves as Apache, while the patch pun spread later and turned into legend. Older Foundation FAQs framed the choice through a stereotyped image of military endurance, language that should not be repeated as if it described Indigenous people themselves.

The history of a software project should not be confused with permission to speak for the people whose name it borrowed. Apache is an umbrella term for several Indigenous peoples and sovereign communities, not one abstract “tribe.” A careful account can record the Foundation's explanation and the existence of the pun without turning a contested cultural reference into promotional mythology for a web server.

Why VirtualHost became central to Apache configuration

One Apache process can serve many sites by distinguishing requests by address, port, and hostname. In modern name-based hosting, the server first selects candidate <VirtualHost> blocks by IP address and port, then compares ServerName and ServerAlias with the hostname in the HTTP request. Many domains can therefore share one IP address. If no hostname matches, Apache uses the first VirtualHost for the selected address and port, which means configuration order can affect the fallback. The complete selection process is documented in the Apache 2.4 name-based hosting guide.

On port 443, selection begins during the TLS connection. The client supplies the hostname through SNI so that the server can choose a VirtualHost and certificate before receiving the ordinary HTTP request. A block can then provide a DocumentRoot for a static site or PHP application, ProxyPass rules for another process, and settings for logs, caching, compression, and access control.

Apache's modular design made those features possible without putting every implementation into one monolithic core. mod_proxy handles proxying, mod_rewrite processes URL rewriting rules, and mod_ssl adds TLS. Ralf Engelschall began mod_ssl in April 1998 from Ben Laurie's Apache-SSL work, with the first public 2.0.0 release arriving on August 10 that year. After US export controls on cryptographic software were relaxed, the module entered Apache HTTP Server 2.0 and now uses OpenSSL as its cryptographic engine. That sequence is documented in the archived mod_ssl FAQ.

Where a2ensite and a2enmod came from

Upstream Apache does not require the sites-available and sites-enabled layout. It is a Debian packaging convention that Ubuntu and other derivatives later inherited. a2enmod was documented as a Debian-specific helper by 2001, while a2ensite was added to the Apache 2 package in 2004 to apply the same mechanism to VirtualHost files.

In the current Debian layout, a2ensite creates a symbolic link in sites-enabled for a configuration stored in sites-available, while a2dissite removes it. The a2enmod and a2dismod pair performs a similar job with mods-available and mods-enabled. The behavior is described in the Debian manual. Fedora, RHEL, Arch Linux, container images, and hand-built installations can use different paths and commands, so an a2ensite procedure is not a universal Apache procedure.

Certbot added another recognizable convention to this layout. Its Apache plugin has traditionally used the -le-ssl.conf extension for an HTTPS VirtualHost it creates, but neither Apache nor Let's Encrypt requires that filename. Running certbot certonly --apache uses Apache to authenticate control of the domain and obtains the certificate without installing it into a VirtualHost. This mode is useful when the administrator wants to retain manual control of the configuration.

What Apache VirtualHost Builder produces

Apache VirtualHost Builder targets Apache 2.4 on Debian or Ubuntu and produces several views of the same configuration. Its port 80 block includes the domain, one alias, and a selected root handler. That handler can be a DocumentRoot with a <Directory> section or a reverse proxy to a local application. Additional paths generate ProxyPass and ProxyPassReverse pairs, and the interface warns when the path and backend URL disagree about a trailing slash.

The port 443 block repeats the routing, enables mod_ssl, and points to fullchain.pem and privkey.pem under the Let's Encrypt directory. Optional settings add an HTTP redirect, Certbot's SSL options file, HSTS, and gzip through mod_deflate. A separate section builds a disk cache with mod_cache_disk, freshness limits through mod_expires, and Cache-Control headers. Caching dynamic or personalized responses without a dedicated review is dangerous, so that section should not be enabled merely as a generic performance switch.

The output is available as separate HTTP and HTTPS files, a combined document, and a command list. The command sequence activates the HTTP VirtualHost and required modules first, runs certbot certonly --apache, then enables the HTTPS file and reloads Apache after certificate issuance. The combined output does not preserve that safety boundary. Enabling it before issuance would expose the missing certificate path to the active configuration.

The builder does not connect to the server, verify DNS, or run Apache's syntax checker. It also assumes /etc/apache2 and /etc/letsencrypt, systemd, one required alias, and a certificate lineage named exactly like the primary domain. Before applying its output, confirm that both DNS names point to the machine, check the actual paths printed by Certbot, remove unnecessary Indexes, AllowOverride All, caching, or HSTS directives, and run sudo apache2ctl configtest. A failed reload normally leaves existing workers on the previous configuration, but a restart with the invalid file will not bring the server back up.

Start by entering the domain and alias, then choose a DocumentRoot or reverse proxy and review every output tab. Copy the files only after checking each directive, and run the commands one at a time. This keeps the builder's main benefit, consistent HTTP and HTTPS VirtualHosts, while leaving security and server structure decisions with the administrator.

Frequently asked questions

Who created Apache HTTP Server?

Apache began as a collective project. In February 1995, eight developers and administrators formed the Apache Group to combine fixes and extensions for NCSA httpd 1.3. Brian Behlendorf and Cliff Skolnick organized the mailing list and shared infrastructure, but attributing the server to one creator would be inaccurate.

Why is the server called Apache?

The Apache Software Foundation's current history says Brian Behlendorf chose the name to show appreciation for the people and tribes who refer to themselves as Apache. The 'a patchy server' pun grew from the project's many NCSA httpd patches and became a popular alternative account. The project's own materials have repeated both versions over the years, so the pun should not be presented as an uncontested origin story.

What are a2ensite and a2enmod?

They belong to the Debian configuration system inherited by Ubuntu and other derivatives, not to Apache HTTP Server on every platform. a2ensite creates a link to a site file in sites-enabled, while a2enmod activates module files from mods-available. Other distributions use different layouts and module-loading procedures.

When was mod_ssl created?

Ralf Engelschall started mod_ssl in April 1998 from Ben Laurie's Apache-SSL work, and the first public mod_ssl 2.0.0 was released on August 10, 1998. The module later entered the Apache HTTP Server 2.0 codebase and relies on OpenSSL for its cryptographic engine.

What happens if the HTTPS VirtualHost is enabled before the certificate exists?

If an active configuration points SSLCertificateFile or SSLCertificateKeyFile at missing files, configuration validation and reload fail. A running Apache instance will normally keep serving with its previous configuration after a failed reload, but the next restart or fresh start will also fail until the paths are fixed or the certificate appears.

Author

Fullstack Engineer

In commercial development since 2011 — over 15 years. Author of two SaaS products, TeleGo.io and LingvoHabit.com. The articles here come out of real client and product work.