################################################################
## Apache Web server configuration for the Regulatory Sequence
## Analysis Tools (RSAT).
##
## This file should be placed at some appropriate place in the Apache
## configuration folder. This place depends on the operating system
## (Mac OSX or Linux) and on the distribution (Linux Ubuntu, Centos,
## ...). 
##
## Some Usual places:
##    On Centos   /etc/httpd/conf.d/rsat.conf
##    On Ubuntu   /etc/apache2/sites-enabled/rsat.conf
##    On Mac OSX  /etc/apache2/users/rsat.conf

## You must replace the bracketed RSAT_PARENT_PATH by the parent dir
## of your rsat folder.

################################################################
## Define the alias.
##
## The RSAT server should be visible when adding this alias after the
## Web server URL.
Alias /rsat [RSAT_PARENT_PATH]/rsat/public_html/


################################################################
## Configuration for Apache 2.2

ScriptAlias /rsat/ [RSAT_PARENT_PATH]/rsat/public_html/

## Enable CGI scripts in the public_html directory
<Directory "[RSAT_PARENT_PATH]/rsat/public_html/">
   AllowOverride All
   Setenv RSAT  [RSAT_PARENT_PATH]/rsat/
   SetEnv R_LIBS_USER [RSAT_PARENT_PATH]/rsat/R-scripts/Rpackages/
   AddHandler cgi-script .cgi
   Options ExecCGI
   Order allow,deny
   Allow from all
</Directory>

## In the data directory we enable indexes, in order to allow users to
## browse data files.
## 
## Note: if the path includes symbolik links, it could be required to add 
##  Options SymLinksIfOwnerMatch
<Directory "[RSAT_PARENT_PATH]/rsat/public_html/data/">
  AllowOverride all
  Options +Indexes
  Order allow,deny
  Allow from all
</Directory>
