astro-php-ssr
v0.1.2
Published
Run .php routes inside Astro SSR via php-cgi (or php fallback).
Maintainers
Readme
astro-php-ssr
Serve PHP under a mount path and allow the PHP dir in Astro
How astro-php-ssr works
Run .php routes inside Astro SSR via php-cgi (preferred) or php fallback.
- ✅ Works with
astro dev/SSR - ✅ GET/POST supported (basic CGI env)
- ✅ Configurable
phpBinaryandphpDir - ⚠️ Requires
php-cgiorphpon the host
Install
npm i astro-php-ssr
# or: yarn add astro-php-ssr
# or: pnpm add astro-php-ssrDemo - Try/Test it Live
Click the badge below to see a working demo:
Or fork it to experiment:
The demo shows:
- Basic PHP route integration
- GET/POST request handling
- PHP file serving
