add solution
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
{% for vhost in apache_vhosts %}
|
||||
<VirtualHost *:80>
|
||||
ServerName {{ vhost.server_name }}
|
||||
{% for alias in vhost.server_alias %}
|
||||
ServerAlias {{ alias }}
|
||||
{% endfor %}
|
||||
ServerAlias {{ inventory_hostname }}
|
||||
DocumentRoot {{ vhost.document_root }}
|
||||
CustomLog {{ apache_log_dir }}/{{ vhost.server_name }}_access.log combined
|
||||
ErrorLog {{ apache_log_dir }}/{{ vhost.server_name }}_error.log
|
||||
<Directory />
|
||||
Options none
|
||||
Allowoverride none
|
||||
Require all denied
|
||||
</Directory>
|
||||
|
||||
<Directory {{ vhost.document_root }}
|
||||
Require all granted
|
||||
</Directory>
|
||||
<Directory {{ vhost.document_root }}/Private>
|
||||
Options indexes
|
||||
AuthName "stop"
|
||||
AuthType Basic
|
||||
AuthUserFile {{ apache_config_dir }}/passwd
|
||||
require valid-user
|
||||
</Directory>
|
||||
</VirtualHost>
|
||||
Reference in New Issue
Block a user