Apache

This module provides tools for configuring the Apache HTTP Server.
See also
fabtools.require.apache
fabtools.apache.ismodule_enabled(_module)[source]
Check if an Apache module is enabled.

fabtools.apache.enablemodule(_module)[source]
Enable an Apache module.
This creates a symbolic link from /etc/apache2/mods-available/ into /etc/apache2/mods-enabled/.
This does not cause Apache to reload its configuration.

  1. import fabtools
  2. fabtools.apache.enable_module('rewrite')
  3. fabtools.service.reload('apache2')

See also
fabtools.require.apache.module_enabled()

fabtools.apache.disablemodule(_module)[source]
Disable an Apache module.
This deletes the symbolink link in /etc/apache2/mods-enabled/.
This does not cause Apache to reload its configuration.

  1. import fabtools
  2. fabtools.apache.disable_module('rewrite')
  3. fabtools.service.reload('apache2')


See also
fabtools.require.apache.module_disabled()

fabtools.apache.issite_enabled(_site_name)[source]
Check if an Apache site is enabled.

fabtools.apache.enablesite(_site_name)[source]
Enable an Apache site.
This creates a symbolic link from /etc/apache2/sites-available/ into /etc/apache2/sites-enabled/.
This does not cause Apache to reload its configuration.

  1. import fabtools
  2. fabtools.apache.enable_site('default')
  3. fabtools.service.reload('apache2')

See also
fabtools.require.apache.site_enabled()

fabtools.apache.disablesite(_site_name)[source]
Disable an Apache site.
This deletes the symbolink link in /etc/apache2/sites-enabled/.
This does not cause Apache to reload its configuration.

  1. import fabtools
  2. fabtools.apache.disable_site('default')
  3. fabtools.service.reload('apache2')

See also
fabtools.require.apache.site_disabled()