vhosts/standard: allow user/group option
Support for DocumentRootUser and DocumentRootGroup
This commit is contained in:
parent
dc46bc8340
commit
5211bdd72b
@ -27,6 +27,12 @@ include:
|
|||||||
- unless: test -d {{ documentroot }}
|
- unless: test -d {{ documentroot }}
|
||||||
- name: {{ documentroot }}
|
- name: {{ documentroot }}
|
||||||
- makedirs: True
|
- makedirs: True
|
||||||
|
{% if site.get('DocumentRootUser') %}
|
||||||
|
- user: {{ site.DocumentRootUser }}
|
||||||
|
{% endif %}
|
||||||
|
{% if site.get('DocumentRootGroup') %}
|
||||||
|
- group: {{ site.DocumentRootGroup }}
|
||||||
|
{% endif %}
|
||||||
- allow_symlink: True
|
- allow_symlink: True
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -71,6 +71,8 @@ apache:
|
|||||||
CustomLog: /path/to/logs/example.com-access.log # E.g.: /var/log/apache2/example.com-access.log
|
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
|
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
|
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
|
SSLCertificateKeyFile: /etc/ssl/mycert.pem.key # if key for cert is needed or in an extra file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user