Docs / IIS and PHP website integration
IIS and PHP website integration
Documentation for the IIS + PHP brainstorm and the MVP implementation shipped in this chat.
Related: BrainstormIntegrations.md · PhpGraphs.md · ProgramStatePortal.md · DiscoveryWordPress.md
Goals
Treat IIS + PHP as the public/edge web plane, while _AugmentedIntelligence remains the cognitive/ops plane:
[AI host: typed commands, discovery, agents, GEMM]
│ REST / file export / dry-run ops
▼
[IIS: sites, app pools, TLS, rewrite, FastCGI PHP]
│
▼
[PHP: program_web_portal, minecraft dashboard, WordPress, custom APIs]
Three integration modes:
| Mode | Direction | Status in MVP |
|---|---|---|
| A. Publish-out | AI → PHP/WP | Discovery→WP; graph JSON deploy |
| B. Ingest-in | PHP → AI | Designed (signed webhooks); not fully live |
| C. Ops-control | AI → IIS | Read-only doctor/list; recycle dry-run/apply |
Implemented commands
All routed through _BrainstormIntegrations (also via integrate …).
IIS
iis status # list sites (PowerShell WebAdministration or appcmd)
iis doctor # feature probe, php on PATH, appcmd presence
iis list # alias of status
iis recycle <pool> # dry-run plan (default)
iis recycle <pool> apply # live appcmd recycle (gated)
Defaults:
- Mutations require explicit
apply. - Safe default pool name if omitted in some forms:
DefaultAppPool.
PHP site
php site status
php site health # index.php / api.php / graphs_all.json presence
php site config root <path> # e.g. program_web_portal or IIS wwwroot
php site config url <base_url> # e.g. http://127.0.0.1:8090
php site deploy # dry-run: would write graph JSON
php site deploy apply # write graphs_*.json under root/data/
Default root if unset: program_web_portal.
Default URL: http://127.0.0.1:8090.
Orchestration
integrate doctor # checklist spanning WP, discovery, portal, IIS, PHP, cutlass
integrate all # seed discovery + portal export + graphs + cutlass check
integrate lua # runs lua_scripts/Brainstorm-Integrations.lua
Lua API
print(iis_status())
print(iis_doctor())
print(iis_recycle("DefaultAppPool", false)) -- dry-run
-- iis_recycle("DefaultAppPool", true) -- live; use carefully
php_site_config_root("program_web_portal")
php_site_config_url("http://127.0.0.1:8090")
print(php_site_health())
print(php_site_deploy(false)) -- dry-run
print(php_site_deploy(true)) -- write graph JSON
Architecture brainstorm (full vision)
Phase 0–1 (partially done)
- Document topology and dry-run rules
iis doctor,iis site list,php site health- Graph JSON deploy into PHP root
Phase 2 — Dual publish
- Discovery → WordPress and
POSTPHP/api/discovery(HMAC) - Static HTML drop under IIS for offline
Phase 3 — ARR + auth
- Reverse-proxy
/app→ AI_WebServerdashboard port - Windows/AD auth on app path
- TLS termination at IIS
Phase 4 — Deploy + recycle (gated)
iis deploy/ package robocopy/WebDeploy with dry-run + AD allowlist- App pool recycle after deploy
Phase 5 — Full portal
- Signed webhooks PHP → automation / discovery
- osTicket / MyBB loops
- Cache purge after publish
What not to do
- Do not expose unrestricted “run any typed command” on public PHP.
- Do not store WP app passwords in the PHP webroot.
- Do not mark discoveries posted on dry-run (already enforced).
- Prefer AI → signed push/file drop over PHP shelling to the desktop agent.
WordPress on IIS
WordPress may run on IIS with PHP FastCGI:
- Configure AI:
wordpress config site https://yoursite … enabled on - Use Application Passwords over HTTPS only.
- Prefer
draftuntil reviewed (discovery wp-status draft). - Pretty permalinks need
web.configURL rewrite rules (IIS-side). - Optionally post to staging site/app pool before production.
Discovery publish details: DiscoveryWordPress.md.
Existing PHP surfaces
| Path | Role |
|---|---|
program_web_portal/ |
Whole-program + RL + Graphs UI |
minecraft_web_dashboard/ |
Spigot live charts |
| WordPress site (external) | Discovery posts via REST |
Minecraft PHP pattern (same idea as graph export):
JSON file or HTTP API → PHP api.php → Chart.js
Security checklist
| Item | Guidance |
|---|---|
| IIS recycle | Dry-run default; apply only on trusted hosts |
| PHP deploy | Writes JSON only under configured root/data |
| Portal HTTP | Bind LAN; read-only |
| Secrets | wordpress_app_password, FTP, future HMAC — AD slots / settings, not repo |
| Body/safe profile | Compose with dry-run freezes on DCC; treat IIS apply as high risk |
Files
BrainstormIntegrations.hpp/.cppprogram_web_portal/*docs/PhpGraphs.mddocs/BrainstormIntegrations.md
Generated from the project markdown docs on 2026-07-24. This is a static, self-contained site.