Web servers and engines in the ecosystem
"Exponential runs behind any web server that can rewrite a URL" and "does not require any particular one"
(README.md, "How Exponential is served").
Warning
.htaccess slows down every request. When .htaccess files are enabled (AllowOverride anything but None), let alone
used, Apache looks for them and reads and evaluates them on every request, in every directory of the path, and
page loading times go up drastically (measured). The only real fix is to switch the feature off for
the virtual host: AllowOverride None in the HTTPS virtual host, and the rules in the virtual host's own
configuration as mod_rewrite rules. That is far faster in production speed tests and well worth the time it takes
to optimize a production configuration. Switch over right away: copy the rules of the
example HTTPS virtual host into your virtual host (with the static cache, also
staticcache_offload.conf), set AllowOverride None, run apachectl configtest, reload Apache and
test the site. The same rules for other servers: nginx, LiteSpeed,
Caddy, IIS, Velocity (built in); where virtual host rules go in a control
panel: Plesk, cPanel, DirectAdmin, ISPConfig.
On LiteSpeed or OpenLiteSpeed, the server's own page cache can also answer anonymous visitors and crawlers without PHP: Page caching with LiteSpeed and OpenLiteSpeed.
Contents
Velocity and its engines
| Engine | Role |
|---|---|
| Qbix | Velocity's own server; "The recommended engine for every stage, from development to production, and the fastest" |
| FrankenPHP | "The production-ready alternative" |
| PHP's built-in server | For development; "the shipped default because it always works" |
More: Exponential Velocity, Velocity engines.
Traditional servers
| Server | How it rewrites | Notes from the README |
|---|---|---|
| Apache HTTP Server | mod_rewrite, .htaccess | "The most widely used; .htaccess ships with Exponential" |
| Nginx | try_files / rewrite | Rules in the server block |
| LiteSpeed, OpenLiteSpeed | .htaccess-compatible | Reads Apache rules in most cases |
| Caddy | rewrite / handle / try_files | Automatic HTTPS |
| Microsoft IIS | URL Rewrite Module (web.config) | Windows hosting |
| lighttpd | mod_rewrite | Small footprint |
| H2O | redirect / file.custom-handler | HTTP/2 focused |
| Traefik | ReplacePathRegex | Usually in front of another server |
PHP's built-in server with php -S is "Development only [...] Never expose it to the internet" (README.md).
Choosing
| Situation | Choice |
|---|---|
| Your own server or VM | Velocity with the Qbix engine |
| You prefer a Caddy-based single binary | Velocity with FrankenPHP |
| Shared hosting without long-lived processes | Apache or LiteSpeed with .htaccess |
| Several customers needing operating-system isolation | One Velocity instance per site, or per-site PHP-FPM pools |
| A tuned Nginx or Apache already in front | Keep it; Velocity can run behind it |
Source: README.md, "When a traditional server is still the right answer". Hosting models:
Hosting companies: start here.
Related pages
- The PHP stack
- Serving the site
- Velocity web server
- Web server and Solr commands
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.