Giter Site home page Giter Site logo

ansible-role-apache's Introduction

ROLE APACHE

https://img.shields.io/github/license/adfinis-sygroup/ansible-role-apache.svg?style=flat-square https://img.shields.io/travis/adfinis-sygroup/ansible-role-apache.svg?style=flat-square https://img.shields.io/badge/galaxy-adfinis--sygroup.apache-660198.svg?style=flat-square

A brief description of the role goes here.

Requirements

Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.

Role Variables

Listen IP and port:

  • apache_listen_ip: The IP to listen on
  • apache_listen_port: Port to listen on for non-SSL vhosts
  • apache_listen_port_ssl: Listen port vor SSL vhosts

Vhost configuration files:

  • apache_vhosts_filename: Name of the vhost configuration file created on the host
  • apache_vhosts_template: Name of the vhost configuration template in the ansible templates directory

Vhost default options (applies to all vhosts unless overriden):

  • apache_allow_override: Default allow_override setting to allow overrides in .htaccess files
  • apache_options: Default apache options that can be overridden in a particular vhost configuration

apache_vhosts defines all Apache virtual hosts (non-ssl vhost). Each vhost contains the required variable servername to uniquely identify the vhost. All other variables are optional and defined as follows:

  • serveralias: Alias or alternative name for the host
  • documentroot: Main document tree
  • redirect_ssl: Redirect to SSL enabled vhost
  • options: Vhost apache options that override the default options of the global variable apache_options
  • serveradmin: Email address of server admin

SSL Variables

apache_vhosts_ssl defines all SSL-enabled Apache virtual hosts, supporting the same variables as apache_vhosts (except for redirect_ssl). Additionally, SSL key and certificate need to be specified.

SSL variables specific to a vhost in apache_vhosts_ssl:

  • certificate_file: SSL certificate and chain file
  • certificate_key_file: SSL key file
  • certificate_chain_file: Separate chain file, deprecated since apache 2.4.8

Global SSL variables (not vhost specific):

  • apache_ssl_protocol: Allowed SSL protocol versions
  • apache_ssl_cipher_suite: Allowed SSL cipher suites

Modules

The playbook creates module symlinks into the /etc/apache2/mods-enabled/ directory for Debian based hosts. Modules listed in apache_mods_enabled ar enabled by default:

  • rewrite.load: Rewrite module
  • ssl.load: SSL module

Additional Parameters

Any configuration directive not covered by the variables above can be appended to the apache_vhosts.extra_options and apache_vhosts_ssl.extra_options variables using a literal block scalar as follows:

extra_options: |
  <Location "/status">
    SetHandler server-status
    Require host example.com
  </Location>

These extra options are appended right before the closing <VirtualHost> section.

Dependencies

Example Playbook

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

- hosts: servers
  roles:
     - { role: adfinis-sygroup.apache }

License

GPL-3.0

Author Information

apache role was written by:

ansible-role-apache's People

Contributors

eni23 avatar fujexo avatar karras avatar strixbe avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.