roles/apache: Configure mod_userdir
By default, per-user directories (i.e. `/~username/`) are disabled in Fedora's configuration of Apache. This commit introduces a new variable, `apache_userdir`, which can be used to enable this feature. It should be set to a string other than *disabled*, which is the path under users' home directories that will be served, if it is accessible. Normally, the value would be `public_html`.
This commit is contained in:
@@ -57,6 +57,18 @@
|
||||
setype=httpd_config_t
|
||||
notify: reload httpd
|
||||
|
||||
- name: ensure apache userdir module is configured
|
||||
template:
|
||||
src=userdir.httpd.conf.j2
|
||||
dest=/etc/httpd/conf.d/userdir.conf
|
||||
mode=0644
|
||||
notify: reload httpd
|
||||
- name: ensure selinux is configured for apache user directories
|
||||
seboolean:
|
||||
name=httpd_enable_homedirs
|
||||
persistent=yes
|
||||
state={{ 'yes' if apache_userdir is defined else 'no' }}
|
||||
|
||||
- name: ensure apache mpm module is configured
|
||||
template:
|
||||
src=mpm.httpd.conf.j2
|
||||
|
||||
Reference in New Issue
Block a user