vhost-manager/src/templates/vhost-http.twig

33 lines
942 B
Twig

{% block body %}
<VirtualHost 127.0.0.1:{{ PORT }}>
ServerName {{ DOMAIN }}
{% if DOMAIN_ALIASES is not empty %}
ServerAlias {{ DOMAIN_ALIASES }}
{% endif %}
DocumentRoot {{ DOCUMENT_ROOT }}
SuexecUserGroup {{ SYSTEM_USER_USERNAME }} {{ SYSTEM_USER_GROUP }}
ErrorLog /services/web/logs/{{ DOMAIN }}.log
CustomLog /services/web/logs/{{ DOMAIN }}.log combined
{% block force_https %}{% if WEB_HTTPS_FORCE == "yes" %}
Redirect permanent / https://{{ DOMAIN }}/{% endif %}{% endblock %}
<Directory {{ DOCUMENT_ROOT }}>
Options -Indexes +FollowSymLinks +MultiViews
AllowOverride All
Order allow,deny
allow from all
Options +ExecCGI
</Directory>
{% if PHP_ENABLED == "yes" %}
<IfModule mod_fastcgi.c>
<FilesMatch "\.php$">
SetHandler "proxy:fcgi://127.0.0.1:{{ PHP_FPM_PORT }}/"
</FilesMatch>
</IfModule>
{% endif %}
{% block extra %}{% endblock extra %}
</VirtualHost>
{% endblock body %}