Server::Control allows you to control servers ala apachectl, but with better diagnostics and many more features. It includes both a drop-in replacement for apachectl (“apachectlp”) and an OO interface.
Though it was designed with Apache in mind, there are also subclasses for HTTP::Server::Simple and Net::Server, and it’s general enough to use with any server that has a pid file and listens on a port.
- Checks server status via both pid file and port connect
- Detects and handles corrupt or out-of-date pid files
- Reports what is using a port when it is busy (via lsof)
- Tails the error log when server fails to start
- Supports sudo usage for restricted (< 1024) port
- Easy to customize for your environment with start/stop hooks, etc.
Coming soon: plugins for common tasks associated with starting and stopping servers, such as generating conf files from templates and auto-restarting a server on file change.