<commit_before>---
classes:
  - apache
  - apache::mod::status
  - apache::mod::headers
  - vhosts_asf::vhosts
  - vhosts_asf::modules
  - projects_pvm_asf

apache::keepalive:          'On'
apache::keepalive_timeout:  '15'
apache::max_keepalive_requests: 1000
apache::timeout: 600
apache::default_vhost:      false
apache::docroot:            '/var/www/htdocs'

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::status::allow_from:
  - all
apache::mod::status::apache_version: '2.3'

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

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

vhosts_asf::modules::modules:
  cgi:
    name: 'cgi'

vhosts_asf::vhosts::vhosts:
  projects:
    vhost_name: '*'
    port: 80
    docroot: '/var/www/projects.apache.org/site'
    docroot_owner: 'www-data'
    docroot_group: 'www-data'
    servername: 'projects.apache.org'
    serveraliases:
      - 'projects-new.apache.org'
    serveradmin: '<EMAIL>'
    directoryindex: 'index.py index.html'
    options:
      - Indexes
      - FollowSymLinks
      - MultiViews
      - ExecCGI
    custom_fragment: |
      AddHandler cgi-script .py
      <Location />
        Require ip 192.168.3.11 172.16.58.3 172.16.58.3 192.168.3.11
      </Location>
      <Directory /var/www/projects.apache.org/site/json/>
        Header set Access-Control-Allow-Origin "*"
      </Directory>
      Redirect /feeds http://projects-old.apache.org/feeds
      Redirect /indexes http://projects-old.apache.org/indexes

  reporter:
    vhost_name: '*'
    port: 80
    docroot: '/var/www/reporter.apache.org/site'
    docroot_owner: 'www-data'
    docroot_group: 'www-data'
    servername: 'reporter.apache.org'
    serveradmin: '<EMAIL>'
    directoryindex: 'index.py index.html'
    options:
      - Indexes
      - FollowSymLinks
      - MultiViews
      - ExecCGI
    custom_fragment: |
      AddHandler cgi-script .py
      <Location />
        Require ip 192.168.3.11 172.16.58.3 172.16.58.3 192.168.3.11
      </Location>
      Alias /releases/ /var/www/reporter.apache.org/data/releases/


# Install ldap3 for use by python cron scripts
python::python_pips:
  ldap3:
    ensure: present<commit_msg>Rework site directories using variables<commit_after>---
classes:
  - apache
  - apache::mod::status
  - apache::mod::headers
  - vhosts_asf::vhosts
  - vhosts_asf::modules
  - projects_pvm_asf

apache::keepalive:          'On'
apache::keepalive_timeout:  '15'
apache::max_keepalive_requests: 1000
apache::timeout: 600
apache::default_vhost:      false
apache::docroot:            '/var/www/htdocs'

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::status::allow_from:
  - all
apache::mod::status::apache_version: '2.3'

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

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

vhosts_asf::modules::modules:
  cgi:
    name: 'cgi'

vhosts_asf::vhosts::vhosts:
  projects:
    vhost_name: '*'
    port: 80
    docroot: '/var/www/projects.apache.org/site'
    docroot_owner: %{apache::user}
    docroot_group: %{apache::group} 
    servername: 'projects.apache.org'
    serveraliases:
      - 'projects-new.apache.org'
    serveradmin: '<EMAIL>'
    directoryindex: 'index.py index.html'
    options:
      - Indexes
      - FollowSymLinks
      - MultiViews
      - ExecCGI
    custom_fragment: |
      AddHandler cgi-script .py
      <Location />
        Require ip 192.168.3.11 172.16.58.3 172.16.58.3 192.168.3.11
      </Location>
      <Directory /var/www/projects.apache.org/site/json/>
        Header set Access-Control-Allow-Origin "*"
      </Directory>
      Redirect /feeds http://projects-old.apache.org/feeds
      Redirect /indexes http://projects-old.apache.org/indexes

  reporter:
    vhost_name: '*'
    port: 80
    docroot: '/var/www/reporter.apache.org/site'
    docroot_owner: %{apache::user}
    docroot_group: %{apache::group} 
    servername: 'reporter.apache.org'
    serveradmin: '<EMAIL>'
    directoryindex: 'index.py index.html'
    options:
      - Indexes
      - FollowSymLinks
      - MultiViews
      - ExecCGI
    custom_fragment: |
      AddHandler cgi-script .py
      <Location />
        Require ip 192.168.3.11 172.16.58.3 172.16.58.3 192.168.3.11
      </Location>
      Alias /releases/ /var/www/reporter.apache.org/data/releases/


# Install ldap3 for use by python cron scripts
python::python_pips:
  ldap3:
    ensure: present
{'fraction_non_alphanumeric': 0.14807692307692308, 'fraction_numerical': 0.04423076923076923, 'mean_word_length': 3.2526573998364676, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 14, 'xml': 0}, 'pii_count': 16, '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': '6423830', 'n_tokens_mistral': 2002, 'n_tokens_neox': 1793, 'n_words': 311}