最小服務 + 最小權限 = 最大安全。安裝 IIS 時僅勾選必要元件 (WWW、FTP、SMTP),移除 Indexing Service、FrontPage Extensions 等。
net stop iisadmin),刪除 C:\Inetpub,另建資料目錄於非系統碟,指向新目錄。Administrator 帳號,註冊表 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon 設 DontDisplayLastUserName=1 隱藏最後登入帳號。C:\USR,Shebang 可寫 #!/usr/bin/perl 兼容 Unix。HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\W3SVC\Parameters\ScriptMap 新增:
.cgi → C:\USR\BIN\perl.exe %s %s.pl → C:\USR\BIN\perl.exe %s %sC:\mysql。C:\mysql\bin\mysqld-nt.exe --install 註冊服務。winmysqladmin.exe 設定管理員帳密,系統匣出現燈號圖示。C:\php,複製 php.ini-dist 至 C:\WINNT\php.ini。C:\tmp,設 session.save_path = c:/tmp。php4ts.dll 至 C:\WINNT\System32。PHP → C:\php\sapi\php4isapi.dll。index.php。https://localhost/ 顯示預設頁。phpinfo() 正常輸出。mysql_connect() 連線成功。