File: //volume1/@appstore/WebStation/misc/VirtualHost-apache24.mustache
{{> /var/packages/WebStation/target/misc/apache_web_error_page}}
{{#hosts}}
{{#apache24}}
<VirtualHost{{#port.http}} *:{{.}}{{/port.http}}{{#port.https}} *:{{.}}{{/port.https}}>{{#fqdn}}
ServerName {{fqdn}}
SetEnv HOST {{fqdn}}{{/fqdn}}
DocumentRoot "{{root}}"
<IfModule dir_module>
DirectoryIndex {{#index}} {{.}}{{/index}}
</IfModule>
<Directory "{{root}}">
Options MultiViews FollowSymLinks ExecCGI
AllowOverride All
<IfModule authz_core_module>
Require all granted
</IfModule>
</Directory>
<FilesMatch "\.(php[345]?|phtml)$">
{{#php_handler}}SetHandler "proxy:unix:/run/php-fpm/{{php_handler}}.sock|fcgi://localhost"{{/php_handler}}
{{^php_handler}}Redirect 500{{/php_handler}}
</FilesMatch>
</VirtualHost>
{{/apache24}}
{{/hosts}}