Add vhost config
This commit is contained in:
parent
a29b27ee77
commit
fc82d80ae3
3 changed files with 27 additions and 2 deletions
|
@ -14,6 +14,9 @@ vhosts: []
|
||||||
# aliases:
|
# aliases:
|
||||||
# - dest: my_page
|
# - dest: my_page
|
||||||
# src: /var/www/my_page
|
# src: /var/www/my_page
|
||||||
|
# scriptaliases:
|
||||||
|
# - dest: my_page
|
||||||
|
# src: /var/www/my_page
|
||||||
# directories:
|
# directories:
|
||||||
# - path: /var/www/host.example.org/custom_dir
|
# - path: /var/www/host.example.org/custom_dir
|
||||||
# options:
|
# options:
|
||||||
|
@ -22,6 +25,14 @@ vhosts: []
|
||||||
# allow_override: None
|
# allow_override: None
|
||||||
# require: 'all granted'
|
# require: 'all granted'
|
||||||
# custom_code: ""
|
# custom_code: ""
|
||||||
|
# directoriesmatches:
|
||||||
|
# - path: /var/www/host.example.org/custom_dir
|
||||||
|
# options:
|
||||||
|
# - '-Indexes'
|
||||||
|
# - '-FollowSymLinks'
|
||||||
|
# allow_override: None
|
||||||
|
# require: 'all granted'
|
||||||
|
# custom_code: ""
|
||||||
# custom_code: ""
|
# custom_code: ""
|
||||||
# ldap:
|
# ldap:
|
||||||
# url: ldap://ldap.example.org/ou=People,ou=Users,dc=example,dc=org?uid
|
# url: ldap://ldap.example.org/ou=People,ou=Users,dc=example,dc=org?uid
|
||||||
|
|
|
@ -17,6 +17,6 @@ galaxy_info:
|
||||||
- focal
|
- focal
|
||||||
- jammy
|
- jammy
|
||||||
|
|
||||||
galaxy_tags: []# TODO
|
galaxy_tags: [] # TODO
|
||||||
|
|
||||||
dependencies: []
|
dependencies: []
|
|
@ -35,6 +35,9 @@
|
||||||
Alias /{{ alias.dest }} "{{ alias.src }}"
|
Alias /{{ alias.dest }} "{{ alias.src }}"
|
||||||
{% endfor %}{% endif %}
|
{% endfor %}{% endif %}
|
||||||
|
|
||||||
|
{% if item.scriptaliases is defined %}{% for alias in item.scriptaliases %}
|
||||||
|
ScriptAlias /{{ alias.dest }} "{{ alias.src }}"
|
||||||
|
{% endfor %}{% endif %}
|
||||||
|
|
||||||
{% if item.docroot is defined %} ## Vhost docroot
|
{% if item.docroot is defined %} ## Vhost docroot
|
||||||
DocumentRoot "{{ item.docroot | default("/var/www/" + item.vhostname ) }}/"
|
DocumentRoot "{{ item.docroot | default("/var/www/" + item.vhostname ) }}/"
|
||||||
|
@ -64,6 +67,17 @@
|
||||||
{{ directory.custom_code | default("") }}
|
{{ directory.custom_code | default("") }}
|
||||||
</Directory>{% endfor %}{% endif %}
|
</Directory>{% endfor %}{% endif %}
|
||||||
|
|
||||||
|
{% if item.directoriesmatches is defined %}{% for directorymatch in item.directoriesmatches %}
|
||||||
|
<DirectoryMatch "{{ directorymatch.path }}">
|
||||||
|
{% if directorymatch.options is defined %}
|
||||||
|
Options {% for option in directorymatch.options %}{{ option }} {% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
AllowOverride {{ directorymatch.allow_override | default("All") }}
|
||||||
|
Require {{ directorymatch.require | default("all granted") }}
|
||||||
|
{{ directorymatch.custom_code | default("") }}
|
||||||
|
</Directory>{% endfor %}{% endif %}
|
||||||
|
|
||||||
## Logging
|
## Logging
|
||||||
ErrorLog "/var/log/apache2/{{ item.vhostname }}_error_ssl.log"
|
ErrorLog "/var/log/apache2/{{ item.vhostname }}_error_ssl.log"
|
||||||
ServerSignature Off
|
ServerSignature Off
|
||||||
|
|
Loading…
Reference in a new issue