File: /volume1/@appstore/WebStation/misc/apache22_service_template.mustache
{{#fastcgi}}
<IfModule fastcgi_module>
FastCgiExternalServer /php-fpm-handler-{{id}} -socket {{fastcgi.sock}} -idle-timeout {{read_timeout}}
ScriptAlias /php-fpm-handler-{{id}}.fcgi /php-fpm-handler-{{id}}
</IfModule>{{/fastcgi}}
{{#alias}}
Alias "/{{alias}}" "{{root}}"
<Directory {{root}}>
{{#fastcgi}}
<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 /php-fpm-handler-{{id}}.fcgi
</IfModule>{{/fastcgi}}
<IfModule dir_module>
DirectoryIndex {{#index}} {{.}}{{/index}}
</IfModule>
{{> @apache_rule@ }}
</Directory>
{{/alias}}
{{^alias}}
{{#listen}}
NameVirtualHost *:{{.}}{{/listen}}
<VirtualHost{{#http_port}} *:{{.}}{{/http_port}}{{#https_port}} *:{{.}}{{/https_port}}>{{#fqdn}}
ServerName {{fqdn}}
SetEnv HOST {{fqdn}}{{/fqdn}}
DocumentRoot "{{root}}"
CustomLog "/var/packages/WebStation/var/log/apache22_access_log" "{{id}};%t;%a;\"%r\";%>s;%b;\"%{Referer}i\""
{{> @apache_rule@ }}
Include conf-enabled/.webstation.error_page.default.conf
<Directory "{{root}}">
AllowOverride All
<IfModule dir_module>
DirectoryIndex {{#index}} {{.}}{{/index}}
</IfModule>
{{#fastcgi}}
<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 /php-fpm-handler-{{id}}.fcgi
</IfModule>{{/fastcgi}}
</Directory>
</VirtualHost>
{{#mdns}}
<VirtualHost{{#http_port}} *:{{.}}{{/http_port}}{{#https_port}} *:{{.}}{{/https_port}}>{{#fqdn}}
ServerName {{fqdn}}.local
SetEnv HOST {{fqdn}}.local{{/fqdn}}
DocumentRoot "{{root}}"
CustomLog "/var/packages/WebStation/var/log/apache22_access_log" "{{id}};%t;%a;\"%r\";%>s;%b;\"%{Referer}i\""
{{> @apache_rule@ }}
Include conf-enabled/.webstation.error_page.default.conf
<Directory "{{root}}">
AllowOverride All
<IfModule dir_module>
DirectoryIndex {{#index}} {{.}}{{/index}}
</IfModule>
{{#fastcgi}}
<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 /php-fpm-handler-{{id}}.fcgi
</IfModule>{{/fastcgi}}
</Directory>
</VirtualHost>
{{/mdns}}
{{/alias}}