Installing apache modules on CentOS
NickName:Smohic Ask DateTime:2020-02-07T23:54:30

Installing apache modules on CentOS

I am trying to install apache modules on CentOS 8.1. I have a playbook that is working for Ubuntu and need the same tasks on CentOS.

  vars:
    libs:
      - apache2
      - libapache2-mod-php
      - libapache2-mod-jk
      - libapache2-mod-rpaf
      - libapache2-mod-geoip
      - php-curl
  apt:
    name: "{{ libs }}"
    state: present
    install_recommends: yes 

I installed httpd and php on my system.

- name: Install apache2 on CentOS
  vars:
    libs:
      - httpd
      - httpd-devel
      - php
      - php-curl
  yum:
    name: "{{ libs }}"
    state: present
  when: ansible_distribution == "CentOS"

I don't know what are the mod equivalents for the ones missing. These are the apache modules I need to set.

- name: Set modules
  apache2_module:
    name: "{{ item }}"
    state: present
  with_items:
    - alias
    - authz_host
    - autoindex
    - deflate
    - dir
    - env
    - expires
    - headers
    - jk
    - mime
    - negotiation
    - php7.2
    - proxy 
    - proxy_http
    - rewrite
    - rpaf
    - setenvif
    - ssl
    - filter

Output:

ok: [node1] => (item=alias)
ok: [node1] => (item=authz_host)
ok: [node1] => (item=autoindex)
ok: [node1] => (item=deflate)
ok: [node1] => (item=dir)
ok: [node1] => (item=env)
ok: [node1] => (item=expires)
ok: [node1] => (item=headers)
failed: [node1] (item=jk) => {"ansible_loop_var": "item", "changed": false, "item": "jk", "msg": "None not found. Perhaps this system does not use None to manage apache"}
ok: [node1] => (item=mime)
ok: [node1] => (item=negotiation)
failed: [node1] (item=php7.2) => {"ansible_loop_var": "item", "changed": false, "item": "php7.2", "msg": "None not found. Perhaps this system does not use None to manage apache"}
ok: [node1] => (item=proxy)
ok: [node1] => (item=proxy_http)
ok: [node1] => (item=rewrite)
failed: [node1] (item=rpaf) => {"ansible_loop_var": "item", "changed": false, "item": "rpaf", "msg": "None not found. Perhaps this system does not use None to manage apache"}
ok: [node1] => (item=setenvif)
failed: [node1] (item=ssl) => {"ansible_loop_var": "item", "changed": false, "item": "ssl", "msg": "None not found. Perhaps this system does not use None to manage apache"}
ok: [node1] => (item=filter)

Copyright Notice:Content Author:「Smohic」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/60116890/installing-apache-modules-on-centos

More about “Installing apache modules on CentOS” related questions

Installing apache modules on CentOS

I am trying to install apache modules on CentOS 8.1. I have a playbook that is working for Ubuntu and need the same tasks on CentOS. vars: libs: - apache2 - libapache2-mod-php ...

Show Detail

installing mod_brotli in centos apache

I am having troubles installing brotli on a centos machine. I've checked the docs for brotli and apparently it is available in version 2.4.26 and later. I am running a Apache/2.4.6 (CentOS 7). I ma...

Show Detail

Issues in installing Apache on CentOS 7

I have problems with installing Apache on CentOS 7. I got message 'GuessOS' ,'httpd.h' files couldn't found. But I found that GuessOS and httpd.h files are in correct folders. So please help me to...

Show Detail

Apache Superset | CentOs | Docker | Single container

I am running into build/compile error for development files (header issue) python ldap integration with Apache Superset. Both of the modules are installed openldap-devel and python-devel. https://www.

Show Detail

MongoDB error while installing Rocket.chat in CentOS 8 server with Apache

I am following this tutorial to install a Rocket.chat server in CentOS: https://hostpresto.com/community/tutorials/how-to-install-rocket-chat-server-on-centos-7/ I am new to mongodb and node.js ...

Show Detail

Installing a letsencrypt Certificate on Centos

I am trying to understand the process of installing a letsencrypt certificate on Apache on Centos. I have read the installation instructions, cloned the git repository, and there I’m stuck. Has a...

Show Detail

Installing Oauth on CentOS

I am on CentOS. In magento, for converting the list of data to JSON format i came to know that intially i required to install oauth for consumer side. for installing oauth on centOS, I followed as

Show Detail

installing Apache Ant 1.8.4 on centos

I want to install apache ant1.8.4 on my centos machine. I've read in the apache website but i didn't really understand how should i do tha. I didn't find the package on their website. Is there any ...

Show Detail

apache webserver is already running in centos xampp

I am trying to run xampp in centos and i have already installed it and all php modules. The only issue i face is while i want to start apache getting the below error. Starting XAMPP for Linux 7.2....

Show Detail

How start apache in centOS 7

I was starting Apache using this command : service httpd start in centOS6 Today I did download centOS7-64bit-minimal and wanted to start Apache after installing this. When I use service httpd sta...

Show Detail