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/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}}