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:
|
||||
# - dest: my_page
|
||||
# src: /var/www/my_page
|
||||
# scriptaliases:
|
||||
# - dest: my_page
|
||||
# src: /var/www/my_page
|
||||
# directories:
|
||||
# - path: /var/www/host.example.org/custom_dir
|
||||
# options:
|
||||
|
@ -22,6 +25,14 @@ vhosts: []
|
|||
# allow_override: None
|
||||
# require: 'all granted'
|
||||
# custom_code: ""
|
||||
# directoriesmatches:
|
||||
# - path: /var/www/host.example.org/custom_dir
|
||||
# options:
|
||||
# - '-Indexes'
|
||||
# - '-FollowSymLinks'
|
||||
# allow_override: None
|
||||
# require: 'all granted'
|
||||
# custom_code: ""
|
||||
# custom_code: ""
|
||||
# ldap:
|
||||
# url: ldap://ldap.example.org/ou=People,ou=Users,dc=example,dc=org?uid
|
||||
|
|
|
@ -17,6 +17,6 @@ galaxy_info:
|
|||
- focal
|
||||
- jammy
|
||||
|
||||
galaxy_tags: []# TODO
|
||||
galaxy_tags: [] # TODO
|
||||
|
||||
dependencies: []
|
||||
dependencies: []
|
||||
|
|
|
@ -35,6 +35,9 @@
|
|||
Alias /{{ alias.dest }} "{{ alias.src }}"
|
||||
{% 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
|
||||
DocumentRoot "{{ item.docroot | default("/var/www/" + item.vhostname ) }}/"
|
||||
|
@ -64,6 +67,17 @@
|
|||
{{ directory.custom_code | default("") }}
|
||||
</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
|
||||
ErrorLog "/var/log/apache2/{{ item.vhostname }}_error_ssl.log"
|
||||
ServerSignature Off
|
||||
|
|
Loading…
Reference in a new issue