Explorar el Código

vhosts/standard: allow user/group option

Support for DocumentRootUser and DocumentRootGroup
tags/v0.37.4
Adrien "ze" Urban hace 6 años
padre
commit
5211bdd72b
Se han modificado 2 ficheros con 8 adiciones y 0 borrados
  1. +6
    -0
      apache/vhosts/standard.sls
  2. +2
    -0
      pillar.example

+ 6
- 0
apache/vhosts/standard.sls Ver fichero

@@ -27,6 +27,12 @@ include:
- unless: test -d {{ documentroot }}
- name: {{ documentroot }}
- makedirs: True
{% if site.get('DocumentRootUser') %}
- user: {{ site.DocumentRootUser }}
{% endif %}
{% if site.get('DocumentRootGroup') %}
- group: {{ site.DocumentRootGroup }}
{% endif %}
- allow_symlink: True
{% endif %}


+ 2
- 0
pillar.example Ver fichero

@@ -71,6 +71,8 @@ apache:
CustomLog: /path/to/logs/example.com-access.log # E.g.: /var/log/apache2/example.com-access.log

DocumentRoot: /path/to/www/dir/example.com # E.g., /var/www/example.com
DocumentRootUser: www-data # Force user if specified, leave it default if not
DocumentRootGroup: www-data # Force group if specified, leave it default if not

SSLCertificateFile: /etc/ssl/mycert.pem # if ssl is desired
SSLCertificateKeyFile: /etc/ssl/mycert.pem.key # if key for cert is needed or in an extra file

Cargando…
Cancelar
Guardar