Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

Microsoft IIS

What the Exponential sources say about Windows hosting with Microsoft IIS and FastCGI PHP: the status, what the kernel detects, what Windows lacks, the routing to reproduce in web.config, and the tests to run before…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/hosting/servers/iis.md

On this page

Microsoft IIS

This page is for hosting companies that offer Windows hosting and want to know whether Exponential can be part of it. It answers: what the sources say about IIS, what works differently on Windows, what routing an IIS site must reproduce and what to test. IIS's own management tools are not described here; check Microsoft's documentation for them.

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

  1. Status
  2. What Windows changes
  3. What the kernel knows about IIS
  4. Routing to reproduce
  5. Tests before offering it
  6. Alternatives on Windows machines
  7. Checklist

Status

SourceStatement
README.md, "The traditional options"Microsoft IIS rewrites with the "URL Rewrite Module (web.config)", for "Windows hosting"
Operating system support, Web serversMicrosoft IIS with FastCGI: tier 3; "the URL Rewrite module (web.config); the kernel's request handling has tests for IIS 7 server variables"
Operating system support, PHP SAPIsCGI / FastCGI (cgi-fcgi) is the SAPI for IIS on Windows
Operating system support, Windowsuse the official PHP 8 builds for Windows (x64, non-thread-safe for FastCGI) with Apache or IIS

No web.config ships with Exponential. Tier 3 means expected to work, not tested here (The four tiers).

What Windows changes

From Operating system support, Windows:

  • pcntl and posix do not exist on Windows. Asynchronous publishing (bin/php/ezasynchronouspublisher.php) is not available.
  • Velocity runs its workers as php-cgi subprocesses on Windows, without copy-on-write memory sharing. Its single-file Windows binaries are built without intl, which Exponential's setup requires; run Velocity on Windows through the phar with the official PHP rather than through its binary (expected to work but untested, according to the engine's own platform notes).
  • The documentation and the shell commands in this help are written for Linux; translate paths and permissions.
  • The setup wizard looks for ImageMagick under Windows names too (convertim.exe, convert.exe, in settings/setup.ini).

Note

For a host, the practical consequence is that a Windows plan behaves like a classic FastCGI plan: no Velocity worker pool with shared memory, no asynchronous publishing. State that in the plan description.

What the kernel knows about IIS

  • eZSys (in lib/ezutils/classes/ezsys.php) detects IIS's rewritten requests by the server variable IIS_WasUrlRewritten and then works in virtual host mode, as it does for Apache's .htaccess mode. A site can also force that mode with site.ini [SiteAccessSettings] ForceVirtualHost=true.
  • The server-variable fixtures of the kernel's tests include IIS 7 and IIS 7.5 with FastCGI (tests/tests/lib/ezutils/server/), in virtual host and non-virtual host mode.

Those fixtures were recorded with old PHP versions; they cover how IIS reports its variables, not a current IIS with PHP 8. Test your own stack.

Routing to reproduce

IIS never reads .htaccess, so exp:setup:htaccess does not protect an IIS site (Setting up .htaccess and config.php from the console). Whatever IIS rule set you write must do what .htaccess_root does (Chapter 8, How a request is served):

RequestMust go to
a dot file or dot directory (.git, .env, .htaccess), .well-known excepted404
an existing .php, .phtml or .phar below the root404
/api/...index_rest.php
/content/treemenu..., /<siteaccess>/content/treemenu...index_treemenu.php
a listed asset path (design and extension stylesheets, images, scripts and fonts; var/*/storage/images; image originals; stored PDF exports; public caches; share/icons; the icon themes of extensions, extension/<name>/icons/, images with exactly one extension; package previews; favicon.ico, robots.txt, index.js, sw.js, w3c/p3p.xml)sent as a file
everything elseindex.php

The regular expressions of each line are in .htaccess_root and, for the asset list, in expVelocity::STATIC_PATHS (kernel/classes/expvelocity.php). The derived nginx block on nginx with PHP-FPM shows the same list translated once already.

Warning

Keep the order: the dot-file and script rules first, the catch-all last. A catch-all placed first, or an asset rule that matches .php, can run or leak files.

Tests before offering it

Run the four routing checks of Web servers and engines, then:

  • the front page, a content page, /user/login and the administration answer;
  • an uploaded image is shown and an uploaded file downloads through content/download;
  • the scheduled task that runs runcronjobs.php works with the CLI PHP (Cron jobs);
  • the web PHP and the CLI PHP are the same version with the same extensions (Chapter 2, Command line and web PHP);
  • 64-bit PHP: 32-bit PHP limits a site to 30 languages (Operating system support).

Alternatives on Windows machines

  • Apache with FastCGI PHP on Windows: the shipped .htaccess_root applies directly (copied with php bin/php/console exp:setup:htaccess --apply).
  • WSL2 runs the Linux tiers and is the simpler path for development on Windows.
  • A Linux virtual machine or container on the Windows host, if the plan can be built that way (Containers, Docker and Podman).

Checklist

  • To do: Official PHP 8 x64 non-thread-safe build with FastCGI; intl and the other required extensions present.
  • To do: A rule set that reproduces the routing table above, tested with the routing checks.
  • To do: Plan description states that Velocity's worker pool and asynchronous publishing are not part of it.
  • To do: Scheduled tasks for cron jobs in place and tested.
  • To do: Tested on staging before sale (tier 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.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x