All Projects → geerlingguy → ansible-role-apache-php-fpm

geerlingguy / ansible-role-apache-php-fpm

Licence: MIT License
Apache FastCGI support for PHP-FPM

Projects that are alternatives of or similar to ansible-role-apache-php-fpm

Ansible Role Apache
Ansible Role - Apache 2.x.
Stars: ✭ 341 (+1000%)
Mutual labels:  setup, apache, role
Ansible Role Htpasswd
Ansible Role - htpasswd
Stars: ✭ 17 (-45.16%)
Mutual labels:  apache, role
Ansible Role Nodejs
Ansible Role - Node.js
Stars: ✭ 322 (+938.71%)
Mutual labels:  setup, role
Ansible Role Postgresql
Ansible Role - PostgreSQL
Stars: ✭ 310 (+900%)
Mutual labels:  setup, role
Ansible Role Homebrew
Ansible Role - Homebrew
Stars: ✭ 195 (+529.03%)
Mutual labels:  setup, role
Ansible Role Repo Epel
Ansible Role - EPEL Repository for RHEL/CentOS
Stars: ✭ 149 (+380.65%)
Mutual labels:  setup, role
ansible-role-ansible
Ansible Role - Ansible
Stars: ✭ 91 (+193.55%)
Mutual labels:  setup, role
Ansible Role Security
Ansible Role - Security
Stars: ✭ 398 (+1183.87%)
Mutual labels:  setup, role
Ansible Role Git
Ansible Role - Git
Stars: ✭ 153 (+393.55%)
Mutual labels:  setup, role
ansible-role-raspberry-pi
Configures a Raspberry Pi (running Raspbian).
Stars: ✭ 90 (+190.32%)
Mutual labels:  setup, role
silverbox
Guide describing how to setup compact, silent and energy-efficient GNU/Linux home server
Stars: ✭ 42 (+35.48%)
Mutual labels:  apache
minimal-setup-py
An example for a minimal setup.py
Stars: ✭ 43 (+38.71%)
Mutual labels:  setup
hadoop-data-ingestion-tool
OLAP and ETL of Big Data
Stars: ✭ 17 (-45.16%)
Mutual labels:  apache
grafana
Ansible role to setup Grafana.
Stars: ✭ 28 (-9.68%)
Mutual labels:  role
setup-scheme
Github Actions CI / CD setup for Scheme
Stars: ✭ 13 (-58.06%)
Mutual labels:  setup
setup shift
📨 Automate the download of your current setup
Stars: ✭ 11 (-64.52%)
Mutual labels:  setup
ModSecurityCRS
Implementation of ModSecurity, Core Rule Set (CRS) on Apache server. ModSecurity, sometimes called Modsec, is an open-source web application firewall. ModSecurity was installed and configured on an Ubuntu VM using Virtual Box
Stars: ✭ 24 (-22.58%)
Mutual labels:  apache
PoC-CVE-2021-41773
No description or website provided.
Stars: ✭ 39 (+25.81%)
Mutual labels:  apache
raspberry-pi-3-setup
My Raspberry Pi 3 setup instructions and notes
Stars: ✭ 35 (+12.9%)
Mutual labels:  setup
ansible-role-docker arm
Ansible Role - Docker for ARM and Pi
Stars: ✭ 71 (+129.03%)
Mutual labels:  role

Ansible Role: Apache PHP-FPM

CI

An Ansible Role that configures Apache for PHP-FPM usage on RHEL/CentOS and Debian/Ubuntu.

Requirements

This role is dependent upon geerlingguy.apache, and also requires you have PHP running with PHP-FPM somewhere on the server or elsewhere (I usually configure PHP with the geerlingguy.php role).

When configuring your Apache virtual hosts, you can add the following line to any vhost definition to enable passthrough to PHP-FPM:

# If using a TCP port:
ProxyPassMatch ^/(.*\.php(/.*)?)$ "fcgi://127.0.0.1:9000/var/www/example"

# If using a Unix socket:
ProxyPassMatch ^/(.*\.php(/.*)?)$ "unix:/var/run/php5-fpm.sock|fcgi://localhost/var/www/example"

For a full usage example with the geerlingguy.apache role, see the Example Playbook later in this README.

RedHat 6 and 7

RedHat/CentOS 7 automatically installs and enables mod_proxy_fcgi by default.

RedHat/CentOS 6 installs Apache 2.2, and is much harder to get configured with FastCGI, but here are two guides in case you need to support this use case:

Role Variables

None.

Dependencies

None.

Example Playbook

- hosts: webservers

  vars:
    php_enable_php_fpm: true
    apache_vhosts:
      - servername: "www.example.com"
        documentroot: "/var/www/example"
        extra_parameters: |
              ProxyPassMatch ^/(.*\.php(/.*)?)$ "fcgi://127.0.0.1:9000/var/www/example"

  roles:
    - geerlingguy.apache
    - geerlingguy.php
    - geerlingguy.apache-php-fpm

License

MIT / BSD

Author Information

This role was created in 2016 by Jeff Geerling, author of Ansible for DevOps.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].