#Abills version 0.3
Listen 9443
<VirtualHost _default_:9443>

DocumentRoot "/usr/local/abills/cgi-bin"
#ServerName www.example.com:9443
#ServerAdmin admin@example.com
ErrorLog /var/log/httpd/abills-error.log
#TransferLog /var/log/httpd/abills-access.log 
CustomLog /var/log/httpd/abills-access_log common

<IfModule ssl_module>
  #   SSL Engine Switch:
  #   Enable/Disable SSL for this virtual host.
  SSLEngine on
  SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
  SSLCertificateFile /usr/local/abills/Certs/server.crt
  SSLCertificateKeyFile /usr/local/abills/Certs/server.key
  <FilesMatch "\.(cgi)$">
    SSLOptions +StdEnvVars
  </FilesMatch>
  BrowserMatch ".*MSIE.*" \
         nokeepalive ssl-unclean-shutdown \
         downgrade-1.0 force-response-1.0

  CustomLog /var/log/abills-ssl_request.log \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</IfModule>


# User interface
<Directory "/usr/local/abills/cgi-bin">
  <IfModule ssl_module>  
    SSLOptions +StdEnvVars
  </IfModule> 

  <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{HTTP:Authorization} ^(.*)
    RewriteRule ^(.*) - [E=HTTP_CGI_AUTHORIZATION:%1]
    Options Indexes ExecCGI SymLinksIfOwnerMatch
  </IfModule>

  AddHandler cgi-script .cgi
  Options Indexes ExecCGI FollowSymLinks
  AllowOverride none
  DirectoryIndex index.cgi
  Order allow,deny
  Allow from all

  <Files ~ "\.(db|log)$">
    Order allow,deny
    Deny from all
  </Files>

#For hotspot solution
#ErrorDocument 404 "/abills/"
#directoryIndex "/abills" index.cgi

</Directory>

#Admin interface
<Directory "/usr/local/abills/cgi-bin/admin">
  <IfModule ssl_module>
    SSLOptions +StdEnvVars
  </IfModule>
  
  AddHandler cgi-script .cgi
  Options Indexes ExecCGI FollowSymLinks
  AllowOverride none
  DirectoryIndex index.cgi
  order deny,allow
  allow from all
</Directory>

</VirtualHost>
