Hello everyone, I am new to Caddy and I love it here already .
I am trying to get my PHP scripts to work with Caddy, I have read the documentation about fastcgi which mentions that it is mainly used to serve PHP pages⊠but there is noting much written there about configuring Caddy to work with PHP .
I already have PHP extracted into a folder, but I have no idea how to configure Caddy to use PHP⊠Can anyone point me to the right resources or explain how its done? Thanks in Advance!
Iâm not quite sure how you get that on Windows, but you need PHP-FPM running and listening at some port. fastcgi is used to send him the php requests and wait for the response.
I run Caddy with PHP over fastcgi very successfully on windows (despite @matt comments about people running webservers on windows )
A basic example is here
The important thing to do is startup the php fastcgi server as part of your caddyfile.
There is one other gotcha which is a php fastcgi issue not a Caddy issue and that is you must restart php fastcgi reguarily to prevent memory leaks. In effect this means restarting caddy if you are using the startup directive to start php fastcgi
The simplest thing to do is to write a script to do this for you. I will post a blog post with a script to do this soon.