# This module is loaded in /etc/apache/modules, and enabled by apache-modconf 
# LoadModule vhost_alias_module /usr/lib/apache/1.3/mod_vhost_alias.so

# Define the default user and group for mpm-itk
AssignUserId www-data www-data

ScriptAlias /cgi-bin/ /var/alternc/cgi-bin/

# Deny access to the root filesystem
<Directory />
  Options FollowSymLinks
  AllowOverride None
  Order allow,deny
  Deny from all
</Directory>
#### End security parameters

<Directory /var/alternc/cgi-bin/>
    Options FollowSymLinks IncludesNOEXEC ExecCGI
    AllowOverride None
    Order allow,deny
    Allow from all
    AddHandler cgi-script .cgi
</Directory>

<Directory /var/alternc/bureau/admin/>
  Order allow,deny
  Allow from all

  php_admin_flag safe_mode_gid off
  php_admin_flag safe_mode off
  AddDefaultCharset UTF-8
# open_basedir allows access to specifics directories. We need to grant access to these directories for alternc, awstats, mailman...
  php_admin_value open_basedir /usr/share/alternc-mailman/patches/:/etc/alternc/:/var/run/alternc/:/var/alternc/bureau/:/var/alternc/html/:/var/alternc/tmp:/tmp:/usr/share/php/:/var/cache/alternc-webalizer/:/etc/locale.gen:/var/log/alternc/bureau.log:/var/log/alternc/update_domains.log:/var/alternc/logs/:/etc/awstats/

</Directory>


<Directory /var/alternc/html>
  AllowOverride AuthConfig FileInfo Limit Options Indexes
  Options Indexes Includes -FollowSymLinks MultiViews SymLinksIfOwnerMatch
  Order allow,deny
  Allow from all
  php_admin_flag safe_mode_gid off
  php_admin_flag safe_mode off
  php_admin_value disable_functions chmod,chown,chgrp,link,symlink
  php_admin_value safe_mode_exec_dir /var/alternc/exec.usr
  php_admin_value disable_functions chgrp,link,symlink
  
  php_admin_flag enable_dl off
  php_admin_value upload_tmp_dir /var/alternc/tmp
  php_admin_value sendmail_path /usr/lib/alternc/sendmail
</Directory>

<Directory /usr/share/phpmyadmin>
  AllowOverride AuthConfig Options FileInfo Limit Indexes
  Options Indexes Includes FollowSymLinks MultiViews
  Order allow,deny
  Allow from all
</Directory>
<Directory /usr/share/squirrelmail>
  AllowOverride AuthConfig Options FileInfo Limit Indexes
  Options Indexes Includes FollowSymLinks MultiViews
  Order allow,deny
  Allow from all
</Directory>

<VirtualHost *:80>
  Include /etc/alternc/bureau.conf
</VirtualHost>


Include /var/alternc/apache-vhost/vhosts_all.conf
