Apache web server packages and services
Apache web server is one of the most widely used web server software packages that supports a wide range of back ends, such as Ruby, and Python-based frameworks. It can serve a wide range of dynamic and static pages and applications. In this recipe, we will learn how to configure Apache web server packages and services.
How to do it...
Configure a new minion called
salt-minion-ubuntu
as having the Ubuntu server operating system in thedevelopment
environment.Create a new state directory in the
development
environment calledapache
.Create and edit
/opt/salt-cookbook/development/apache/init.sls
to have the following entries:apache_packages: pkg.installed: - pkgs: - apache2 apache_service: service: - name: apache2 - running - enable: True - require: - pkg: apache_packages
Apply the state to the minion, using the following command:
[root@salt-master ~]# salt 'salt-minion-ubuntu' state.sls apache saltenv=development salt...