⬡ Lacelium
⌘K
Version 2.x ▾
Windows Dedicated

Windows Server (IIS + FastCGI)

Enterprise production deployment guide for Windows-first environments using Microsoft Internet Information Services (IIS 10+), PHP FastCGI orchestration, and Microsoft URL Rewrite 2.1.

Step-by-Step IIS Configuration

Follow these instructions to deploy Lacelium on a Windows Server instance:

1. Install IIS & URL Rewrite Module

Enable IIS with CGI/FastCGI role services in Server Manager, and install the official Microsoft URL Rewrite 2.1 extension via Web Platform Installer.

2. Deploy Source & Set DocumentRoot

Extract the project into C:\inetpub\lacelium and point your IIS Site Physical Path strictly to C:\inetpub\lacelium\public.

3. Grant Filesystem Permissions

Grant the IIS_IUSRS and IUSR accounts Modify and Write permissions on the storage\ and storage\cache\ directories.

IIS URL Rewrite Configuration (web.config)

Place this web.config file directly inside the public/ folder to route all web traffic through index.php:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <defaultDocument>
            <files>
                <clear />
                <add value="index.php" />
            </files>
        </defaultDocument>
        <rewrite>
            <rules>
                <rule name="Lacelium Front Controller" stopProcessing="true">
                    <match url="^(.*)$" ignoreCase="false" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="index.php/{R:1}" appendQueryString="true" />
                </rule>
            </rules>
        </rewrite>
        <security>
            <requestFiltering>
                <hiddenSegments>
                    <add segment=".env" />
                    <add segment="storage" />
                </hiddenSegments>
            </requestFiltering>
        </security>
    </system.webServer>
</configuration>

FastCGI & php.ini Tuning

  • CGI Fix Pathinfo: Verify cgi.fix_pathinfo=1 is enabled in your production php.ini on Windows.
  • OPcache Extension: Ensure zend_extension=opcache is enabled for production bytecode caching.
  • Process Recycling: Configure the IIS FastCGI application pool with an InstanceMaxRequests threshold (e.g. 10000) to recycle PHP worker processes safely.

Next Steps