File: /volume1/@appstore/WebStation/misc/VirtualHost-apache22.mustache
{{> /var/packages/WebStation/target/misc/apache_web_error_page}}
{{#port_info.apache22}}
NameVirtualHost *:{{.}}{{/port_info.apache22}}
{{#fcgi_handlers}}
<IfModule fastcgi_module>
FastCgiExternalServer /vhost-{{.}} -socket /run/php-fpm/{{.}}.sock -idle-timeout 3600
ScriptAlias /vhost-{{.}}.fcgi /vhost-{{.}}
</IfModule>
{{/fcgi_handlers}}
{{#hosts}}
{{#apache22}}
<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
Order allow,deny
Allow from all
</Directory>
{{#php}}
<IfModule fastcgi_module>
AddHandler default-handler .htm .html .shtml
AddHandler php-fastcgi .php .php3 .php4 .php5 .phtml
AddType text/html .php .php3 .php4 .php5 .phtml
Action php-fastcgi /vhost-{{php_handler}}.fcgi
</IfModule>
{{/php}}
</VirtualHost>
{{/apache22}}
{{/hosts}}