mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-08-04 15:47:32 +02:00
Update to 2022-03-07 14:00
This commit is contained in:
44
roles/unmaintained/wh_backend/templates/httpd.conf.j2
Normal file
44
roles/unmaintained/wh_backend/templates/httpd.conf.j2
Normal file
@@ -0,0 +1,44 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
{% for client in wh_clients %}
|
||||
{% for app in client.apps | default([]) %}
|
||||
{% set app = wh_default_app | combine(app, recursive=True) %}
|
||||
{% if app.backend | default(client.backend) | default(wh_defaults.backend) == inventory_hostname %}
|
||||
################################################
|
||||
## vhost for {{ client.name }}-{{ app.name }}
|
||||
################################################
|
||||
|
||||
<VirtualHost *:80>
|
||||
ServerName {{ app.vhost | default(client.name + '-' + app.name + '.wh.fws.fr') }}
|
||||
{% if app.aliases | length > 0 %}
|
||||
ServerAlias {{ app.aliases | join(' ') }}
|
||||
{% endif %}
|
||||
ServerAdmin webmaster@fws.fr
|
||||
DocumentRoot /opt/wh/{{ client.name }}/apps/{{ app.name }}/web
|
||||
Alias /_deferror/ "/usr/share/httpd/error/"
|
||||
Include ansible_conf.d/common_env.inc
|
||||
ProxyTimeout {{ app.php.max_execution_time }}
|
||||
</VirtualHost>
|
||||
|
||||
################################################
|
||||
## webroot for {{ client.name }}-{{ app.name }}
|
||||
################################################
|
||||
|
||||
<Directory /opt/wh/{{ client.name }}/apps/{{ app.name }}/web>
|
||||
AllowOverride All
|
||||
Options FollowSymLinks
|
||||
Require all granted
|
||||
{% if app.php.enabled %}
|
||||
<FilesMatch \.php$>
|
||||
SetHandler "proxy:unix:/run/php-fpm/php{{ app.php.version}}-{{ client.name }}-{{ app.name }}.sock|fcgi://localhost"
|
||||
</FilesMatch>
|
||||
{% endif %}
|
||||
|
||||
<FilesMatch "^(\.ansible_version|\.git.*|(README|LICENSE|AUTHORS|CHANGELOG|CONTRIBUTING|LEGALNOTICE|PRIVACY|SECURITY)(\.md)?|.*\.co?nf|\.htaccess|composer\.(json|lock))">
|
||||
Require all denied
|
||||
</FilesMatch>
|
||||
</Directory>
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
Reference in New Issue
Block a user