<commit_before># Copyright 2006-2008 by <NAME>. All rights reserved.
Capistrano::Configuration.instance(:must_exist).load do 
  namespace :deprec do
    namespace :apache do
      
      set :apache_user, 'www-data'
      set :apache_vhost_dir, '/etc/apache2/sites-available'
      set :apache_ssl_enabled, false
      set :apache_ssl_ip, nil
      set :apache_ssl_forward_all, apache_ssl_enabled
      set :apache_ssl_chainfile, false
      set :apache_modules_enabled, %w(rewrite ssl proxy_balancer proxy_http deflate headers)
      set :apache_log_dir, '/var/log/apache2'
       
      desc "Install apache"
      task :install do
        install_deps
        enable_modules
        reload
      end
      
      # install dependencies for apache
      task :install_deps do
        apt.install( {:base => %w(apache2-mpm-prefork apache2-prefork-dev rsync ssl-cert)}, :stable )
      end
      
      SYSTEM_CONFIG_FILES[:apache] = [
        
        { :template => 'namevirtualhosts.conf',
          :path => '/etc/apache2/conf.d/namevirtualhosts.conf',
          :mode => 0644,
          :owner => 'root:root'}

      ]

      PROJECT_CONFIG_FILES[:apache] = [
        # Not required
      ]

      desc "Generate configuration file(s) for apache from template(s)"
      task :config_gen do
        config_gen_system
      end

      task :config_gen_system do
        SYSTEM_CONFIG_FILES[:apache].each do |file|
          deprec2.render_template(:apache, file)
        end
      end

      task :config_gen_project do
        PROJECT_CONFIG_FILES[:apache].each do |file|
          deprec2.render_template(:apache, file)
        end
        # XXX Need to flesh out generation of custom certs
        # In the meantime we'll just use the snakeoil cert
        #
        # top.deprec.ssl.config_gen if apache_ssl_enabled
        top.deprec.ssl.config_gen if apache_ssl_enabled
      end
      
      desc "Push apache config files to server"
      task :config, :roles => :web do
        config_system
      end
      
      desc "Generate initial configs and copy direct to server."
      task :initial_config, :roles => :web do
        SYSTEM_CONFIG_FILES[:apache].each do |file|
          deprec2.render_template(:apache, file.merge(:remote => true))
        end
      end
      <commit_msg>Added status.conf to config templates<commit_after># Copyright 2006-2008 by <NAME>. All rights reserved.
Capistrano::Configuration.instance(:must_exist).load do 
  namespace :deprec do
    namespace :apache do
      
      set :apache_user, 'www-data'
      set :apache_vhost_dir, '/etc/apache2/sites-available'
      set :apache_ssl_enabled, false
      set :apache_ssl_ip, nil
      set :apache_ssl_forward_all, apache_ssl_enabled
      set :apache_ssl_chainfile, false
      set :apache_modules_enabled, %w(rewrite ssl proxy_balancer proxy_http deflate headers)
      set :apache_log_dir, '/var/log/apache2'
       
      desc "Install apache"
      task :install do
        install_deps
        enable_modules
        reload
      end
      
      # install dependencies for apache
      task :install_deps do
        apt.install( {:base => %w(apache2-mpm-prefork apache2-prefork-dev rsync ssl-cert)}, :stable )
      end
      
      SYSTEM_CONFIG_FILES[:apache] = [
        
        { :template => 'namevirtualhosts.conf',
          :path => '/etc/apache2/conf.d/namevirtualhosts.conf',
          :mode => 0644,
          :owner => 'root:root'},
          
        # { :template => 'ports.conf.erb',
        #   :path => '/etc/apache2/ports.conf',
        #   :mode => 0644,
        #   :owner => 'root:root'},

        { :template => 'status.conf.erb',
          :path => '/etc/apache2/mods-available/status.conf',
          :mode => 0644,
          :owner => 'root:root'}
          
      ]

      PROJECT_CONFIG_FILES[:apache] = [
        # Not required
      ]

      desc "Generate configuration file(s) for apache from template(s)"
      task :config_gen do
        config_gen_system
      end

      task :config_gen_system do
        SYSTEM_CONFIG_FILES[:apache].each do |file|
          deprec2.render_template(:apache, file)
        end
      end

      task :config_gen_project do
        PROJECT_CONFIG_FILES[:apache].each do |file|
          deprec2.render_template(:apache, file)
        end
        # XXX Need to flesh out generation of custom certs
        # In the meantime we'll just use the snakeoil cert
        #
        # top.deprec.ssl.config_gen if apache_ssl_enabled
        top.deprec.ssl.config_gen if apache_ssl_enabled
      end
      
      desc "Push apache config files to server"
      task :config, :roles => :web do
        config_system
        reload
      end
      
      desc "Generate initial configs and copy direct to server."
      task :initial_config, :roles => :web do
        SYSTEM_CONFIG_FILES[:apache].each do |file|
          deprec2.render_template(:apache, file.merge(:remote => true))
        end
      end
      
{'fraction_non_alphanumeric': 0.09195171026156941, 'fraction_numerical': 0.01006036217303823, 'mean_word_length': 2.1723037651563497, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, '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': '3288556', 'n_tokens_mistral': 1535, 'n_tokens_neox': 1449, 'n_words': 371}