File: /volume1/@appstore/WebStation/misc/VirtualHost-apache24.mustache
Include conf-enabled/.webstation.error_page.default.conf
{{#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>
{{#php_handler}}
<FilesMatch "\.(php[345]?|phtml)$">
ProxyFCGISetEnvIf "true" SCRIPT_FILENAME ".%{reqenv:SCRIPT_NAME}"
SetHandler "proxy:unix:/run/php-fpm/{{.}}.sock|fcgi://{{.}}"
</FilesMatch>
{{/php_handler}}
{{#python_handler}}
<IfModule proxy_uwsgi_module>
ProxyPass / "unix:/run/python-uwsgi/{{.}}.sock|uwsgi://{{.}}/"
</IfModule>
{{/python_handler}}
</VirtualHost>
{{#mdns}}
<VirtualHost{{#port.http}} *:{{.}}{{/port.http}}{{#port.https}} *:{{.}}{{/port.https}}>{{#fqdn}}
ServerName {{fqdn}}.local
SetEnv HOST {{fqdn}}.local{{/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>
{{#php_handler}}
<FilesMatch "\.(php[345]?|phtml)$">
SetHandler "proxy:unix:/run/php-fpm/{{.}}.sock|fcgi://{{.}}"
</FilesMatch>
{{/php_handler}}
{{#python_handler}}
<IfModule proxy_uwsgi_module>
ProxyPass / "unix:/run/python-uwsgi/{{.}}.sock|uwsgi://{{.}}/"
</IfModule>
{{/python_handler}}
</VirtualHost>
{{/mdns}}
{{/apache24}}
{{/hosts}}