<commit_before>---
classes:
  - apache
  - apache::mod::authnz_ldap
  - apache::mod::dav_svn
  - apache::mod::geoip
  - apache::mod::rewrite
  - apache::mod::proxy
  - apache::mod::proxy_http
  - apache::mod::status
  - apache::mod::ssl
  - apbackup
  - datadog_agent::integrations::apache
  - httpd_modules
  - httpd_modules::mod_svn_check_path
  - blocky
  - loggy
  - nfs::server
  - nfs_asf::server
  - perl
  - rootbin_asf
  - ssl::name::wildcard_apache_org
  - stunnel_asf
  - svnpubsub
  - subversion_server
  - subversion_server::board_reminders
  - vhosts_asf::modules
  - vhosts_asf::vhosts
  
apache::keepalive:          'On'
apache::keepalive_timeout:  '15'
apache::max_keepalive_requests: 1000
apache::timeout: 600
apache::default_vhost:      false
apache::docroot:            '/x1/www'
apache::manage_user:        false

apache::mod::event::listenbacklog: '511'
apache::mod::event::maxclients: '250'
apache::mod::event::maxconnectionsperchild: '200000'
apache::mod::event::maxrequestworkers: '500'
apache::mod::event::maxsparethreads: '150'
apache::mod::event::minsparethreads: '150'
apache::mod::event::serverlimit: '10'
apache::mod::event::startservers: '5'
apache::mod::event::threadlimit: '250'
apache::mod::event::threadsperchild: '50'

apache::mod::reqtimeout::timeouts:
  - 'header=30,MinRate=400'
  - 'body=60,MinRate=300'

apache::mod::status::allow_from:
  - all
apache::mod::status::apache_version: '2.3'

apache::mpm_module:         'event'
apache::serveradmin:        '<EMAIL>'

apbackup::gid: 9997
apbackup::uid: 9997

base::basepackages:
  - libapache2-mod-geoip
  - svnmailer

base::hosts:
  localhost:
    ip: '127.0.0.1'
    host_aliases:
      - 'svn01-us-west-internal.apache.org'

datadog_agent::integrations::apache::url: 'https://svn01-us-west-internal.apache.org/server-status?auto'

fail2ban_asf::config::jails:
  httpd-svn:
    filter: apache-auth
    action:
      - iptables-allports
    logpath: /var/log/apache2/svn_https_error_ssl.log
    findtime: 1800
    maxretry: 5
    enable: true

httpd_modules::dev_package:
  - apache2-dev
httpd_modules::mod_svn_check_path::required_packages:
  - libsvn-dev
  - libapreq2-dev
httpd_modules::mod_svn_check_path::command: 'apxs2 -DFILTERING -I /usr/include/subversion-1 -i -a -c mod_svn_check_path.c'

logrotate::rule:
  apache2:
    ensure: 'present'

nfs::server::export:
  /x1/svn/repos/asf:
    options:   'ro'
    clients:   '172.16.17.32(ro)'

perl::module:
  net_ldap:
    name: 'Net::LDAP'
    use_package : true

snmp::snmpd_config:
  - 'disk /x1 10%'
  - 'disk /x1/svn 10%'
  - 'disk /x1/svn/repos/asf 10%'
  - 'disk /x1/svn/repos/dist 10%'
  - 'disk /x1/svn/repos/infra 10%'
  - 'disk /x1/svn/repos/private 10%'
  - 'disk /x1/svn/repos/tck 10%'
  - 'rouser monitor authNoPriv'
  - 'smuxpeer .192.168.127.12.4.1.674.10892.1'
  - 'disk / 10000'
  - 'disk /var 5%'
  - 'includeAllDisks 10%'

subversion_server::packages:
  - 'viewvc'

subversion_server::svn_master_hostname: 'svn01-us-west.apache.org'

subversion_server::board_reminders::install_path: '/usr/local/bin/board_reminders'
subversion_server::board_reminders::packages:
  - libdate-manip-perl
  - libfindbin-libs-perl
  - libfile-slurp-perl
  - libfile-spec-perl 

vhosts_asf::modules::modules:
  authz_svn:
    name: 'authz_svn'
  svn_check_path:
    name: 'svn_check_path'
  cgi:
    name: 'cgi'

vhosts_asf::vhosts::vhosts:
  dist:
    vhost_name: '*'
    port: 80
    docroot: '/var/www'
    servername: 'dist.apache.org'
    serveraliases:
      - 'dist.*.apache.org'
    custom_fragment: |
      RedirectMatch permanent ^/$ https://dist.apache.org/repos/dist

  dist_https:
    vhost_name: '*'
    port: 443
    ssl_cert:  '/etc/ssl/certs/wildcard.apache.org.crt'
    ssl_chain: '/etc/ssl/certs/wildcard.apache.org.chain'
    ssl_key:  '/etc/ssl/private/wildcard.apache.org.key'
    ssl: true<commit_msg>Fix the broken redirection experience, for http->https to match URLs, and allow the https vhost to ensure that folks cannot just see /  as per INFRA-10707<commit_after>---
classes:
  - apache
  - apache::mod::authnz_ldap
  - apache::mod::dav_svn
  - apache::mod::geoip
  - apache::mod::rewrite
  - apache::mod::proxy
  - apache::mod::proxy_http
  - apache::mod::status
  - apache::mod::ssl
  - apbackup
  - datadog_agent::integrations::apache
  - httpd_modules
  - httpd_modules::mod_svn_check_path
  - blocky
  - loggy
  - nfs::server
  - nfs_asf::server
  - perl
  - rootbin_asf
  - ssl::name::wildcard_apache_org
  - stunnel_asf
  - svnpubsub
  - subversion_server
  - subversion_server::board_reminders
  - vhosts_asf::modules
  - vhosts_asf::vhosts
  
apache::keepalive:          'On'
apache::keepalive_timeout:  '15'
apache::max_keepalive_requests: 1000
apache::timeout: 600
apache::default_vhost:      false
apache::docroot:            '/x1/www'
apache::manage_user:        false

apache::mod::event::listenbacklog: '511'
apache::mod::event::maxclients: '250'
apache::mod::event::maxconnectionsperchild: '200000'
apache::mod::event::maxrequestworkers: '500'
apache::mod::event::maxsparethreads: '150'
apache::mod::event::minsparethreads: '150'
apache::mod::event::serverlimit: '10'
apache::mod::event::startservers: '5'
apache::mod::event::threadlimit: '250'
apache::mod::event::threadsperchild: '50'

apache::mod::reqtimeout::timeouts:
  - 'header=30,MinRate=400'
  - 'body=60,MinRate=300'

apache::mod::status::allow_from:
  - all
apache::mod::status::apache_version: '2.3'

apache::mpm_module:         'event'
apache::serveradmin:        '<EMAIL>'

apbackup::gid: 9997
apbackup::uid: 9997

base::basepackages:
  - libapache2-mod-geoip
  - svnmailer

base::hosts:
  localhost:
    ip: '127.0.0.1'
    host_aliases:
      - 'svn01-us-west-internal.apache.org'

datadog_agent::integrations::apache::url: 'https://svn01-us-west-internal.apache.org/server-status?auto'

fail2ban_asf::config::jails:
  httpd-svn:
    filter: apache-auth
    action:
      - iptables-allports
    logpath: /var/log/apache2/svn_https_error_ssl.log
    findtime: 1800
    maxretry: 5
    enable: true

httpd_modules::dev_package:
  - apache2-dev
httpd_modules::mod_svn_check_path::required_packages:
  - libsvn-dev
  - libapreq2-dev
httpd_modules::mod_svn_check_path::command: 'apxs2 -DFILTERING -I /usr/include/subversion-1 -i -a -c mod_svn_check_path.c'

logrotate::rule:
  apache2:
    ensure: 'present'

nfs::server::export:
  /x1/svn/repos/asf:
    options:   'ro'
    clients:   '172.16.17.32(ro)'

perl::module:
  net_ldap:
    name: 'Net::LDAP'
    use_package : true

snmp::snmpd_config:
  - 'disk /x1 10%'
  - 'disk /x1/svn 10%'
  - 'disk /x1/svn/repos/asf 10%'
  - 'disk /x1/svn/repos/dist 10%'
  - 'disk /x1/svn/repos/infra 10%'
  - 'disk /x1/svn/repos/private 10%'
  - 'disk /x1/svn/repos/tck 10%'
  - 'rouser monitor authNoPriv'
  - 'smuxpeer .1.3.6.1.4.1.674.10892.1'
  - 'disk / 10000'
  - 'disk /var 5%'
  - 'includeAllDisks 10%'

subversion_server::packages:
  - 'viewvc'

subversion_server::svn_master_hostname: 'svn01-us-west.apache.org'

subversion_server::board_reminders::install_path: '/usr/local/bin/board_reminders'
subversion_server::board_reminders::packages:
  - libdate-manip-perl
  - libfindbin-libs-perl
  - libfile-slurp-perl
  - libfile-spec-perl 

vhosts_asf::modules::modules:
  authz_svn:
    name: 'authz_svn'
  svn_check_path:
    name: 'svn_check_path'
  cgi:
    name: 'cgi'

vhosts_asf::vhosts::vhosts:
  dist:
    vhost_name: '*'
    port: 80
    docroot: '/var/www'
    servername: 'dist.apache.org'
    serveraliases:
      - 'dist.*.apache.org'
    custom_fragment: |
      RedirectMatch permanent ^(.*)$ https://dist.apache.org$1

  dist_https:
    vhost_name: '*'
    port: 443
    ssl_cert:  '/etc/ssl/certs/wildcard.apache.org.crt'
    ssl_chain: '/etc/ssl/certs/wildcard.apache.org.chain'
    ssl_key:  '/etc/ssl/private/wildcard.apache.org.key'
    ssl: true
{'fraction_non_alphanumeric': 0.1575063613231552, 'fraction_numerical': 0.038040712468193384, 'mean_word_length': 3.8226993865030674, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 6, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '809966', 'n_tokens_mistral': 3417, 'n_tokens_neox': 3141, 'n_words': 452}