HEX
Server: Apache/2.4.63 (Unix)
System: Linux TOMS-220NAS 4.4.302+ #86009 SMP Wed Nov 26 18:19:17 CST 2025 x86_64
User: flavio87 (1026)
PHP: 8.3.27
Disabled: NONE
Upload Files
File: /volume1/@appstore/WebStation/misc/VirtualHost-apache22.mustache
Include conf-enabled/.webstation.error_page.default.conf

{{#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>

{{#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
        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>
{{/mdns}}

{{/apache22}}
{{/hosts}}