Example to run php fastcgi on Windows #47

Merged
merged 5 commits into from Feb 19, 2017

Projects

None yet

2 participants

@tobya
Contributor
tobya commented Feb 9, 2017 edited

There are lots of examples of starting a fast cgi server to server php on linux. However it took me quite a while to figure out how to do it on Windows, so this provides an example.

@mholt

The casing probably doesn't matter on Windows, but Caddyfile should still be capitalized to be consistent ;)

winphp/readme.md
+
+> startup c:\path\to\php\php-cgi.exe -b 6545 &
+
+This starts a fastcgi server on localhost port 6545. The & ensures that the command doesnt block caddy from continuing
@mholt
mholt Feb 11, 2017 Member

"doesn't"

Period after "continuing"

Is there a way to stop the process when Caddy stops?

winphp/readme.md
+
+This starts a fastcgi server on localhost port 6545. The & ensures that the command doesnt block caddy from continuing
+
+Combine this with some scripts to restart caddy and the php fastcgi on regular intervals and you have a very robust setup for windows.
@mholt
mholt Feb 11, 2017 Member

restart caddy and the php fastcgi on regular intervals

Why?

@mholt
mholt approved these changes Feb 19, 2017 View changes
@mholt mholt merged commit 586f7d3 into caddyserver:master Feb 19, 2017
@mholt
Member
mholt commented Feb 19, 2017

Thanks for your contribution, @tobya!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment