Skip to content

Basic Scripts to run and Restart Caddy PHP on Windows Server

Notifications You must be signed in to change notification settings

tobya/CaddyWindowsScripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Windows Caddy Scripts

Two scripts to run caddy with php fast-cgi reliably on windows.

RunCaddy.bat runs caddy and will restart whenever caddy is killed.

shutdownCaddy.bat kills Caddy and any subprocesses (essential for killing fast-cgi processes created with startup directive )

On my server I have a task that calls shutdownCaddy.bat every 5 hours. I don't have very much traffic. ON a busy site you may need to restart much more frequently.

Restart happens in sub 1 second timeframe.

Doesn't Taskkill cause a forced shutdown?

Yes. However on windows there is no way of sending an interupt to a process such as Ctrl-C (well there are but they are all very involved.)

The shutdownCaddy.bat script does do a forcedkill and does NOT allow caddy to do a safe shutdown. This has two effects. On a heavy traffic site there is a possibility of 502 errors. Also no shutdown directives are executed.

About

Basic Scripts to run and Restart Caddy PHP on Windows Server

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published