No commit activity in last 3 years
No release in over 3 years
Executes Apache service tasks like reload or restart from Capistrano
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 10.1

Runtime

 Project Readme

Capistrano Apache

Official Capistrano extension for Apache tasks. Supports httpd and apache2 (see Configuration below) This replaces 1.0.0 of https://rubygems.org/gems/capistrano-apache. It differs greatly in configuration.

Environments Supported

systemd sysv & upstart
capistrano/apache/systemd capistrano/apache/sysv_upstart

Installation

Add this line to your application's Gemfile:

gem 'capistrano', '~> 3.2'
gem 'capistrano-apache'

Usage

Require one of the above 'Environments Supported' in your Capfile:

require 'capistrano/apache/systemd'

capistrano/apache comes with 5 tasks:

  • apache:reload
  • apache:force_reload
  • apache:restart
  • apache:stop

You can execute the task on command line:

cap production apache:reload

And configure it on your deploy.rb file:

namespace :deploy do
  after :finishing, 'apache:reload'
  after :rollback, 'apache:reload'
end

Configuration

Configurable options shown here are also the defaults:

set :apache_with_sudo, true
set :apache_roles, :web
set :apache_service_name, 'httpd' # Specify apache2 here if needed
set :systemctl_location, '/bin/systemctl' # May already exist if you use other plugins. Be sure to check your config/deploy/{env} file

More Capistrano automation?

Check out capistrano-plugins github org.

Contributing and bug reports

Contributions and improvements are very welcome.

If something is not working for you, or you find a bug please report it.

Thanks

License

MIT