The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
---
% my $root = dir "@{[ home ]}/var/run";
% $root->mkpath(0,0700);

url: http://<%= $host %>:<%= $port %>
start_mode: apache

apache:
  args: -f <%= $root %>/apache.<%= $port %>.conf -E <%= $root %>/apache.<%= $port %>.startup.log
  pid_file: <%= $root %>/apache.<%= $port %>.pid
  autogen:
    filename: <%= $root %>/apache.<%= $port %>.conf
    content: |
      LoadModule alias_module      modules/mod_alias.so
      LoadModule cgi_module        modules/mod_cgi.so
      LoadModule unixd_module      modules/mod_unixd.so
      LoadModule authn_core_module modules/mod_authn_core.so
      LoadModule authz_core_module modules/mod_authz_core.so
      LoadModule authz_host_module modules/mod_authz_host.so
      LoadModule env_module        modules/mod_env.so
      LoadModule log_config_module modules/mod_log_config.so
      
      Listen     <%= $host %>:<%= $port %>
      ServerName <%= $host %>
      PidFile    <%= $root %>/apache.<%= $port %>.pid
      
      ErrorLog   <%= $root %>/apache.<%= $port %>.error.log
      LogFormat "%h %l %u %t \"%r\" %>s %b" common
      CustomLog  <%= $root %>/apache.<%= $port %>.access.log common
      
      PassEnv PERL5LIB
      PassEnv HOME
      ScriptAlias / <%= $0 %>/
      
      <Directory <%= $0 %>/ >
        Options +ExecCGI
        SetHandler cgi-script
        <RequireAll>
          Require all granted
        </RequireAll>
      </Directory>