################################################################
## 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
##
## Note: for Apache 2.2, use template file RSAT_config_default_apache2.2.conf
##
## You must replace the bracketed RSAT_PARENT_PATH by the parent dir
## of your rsat folder. This is done automatically with the command
## perl-scripts/configure_rsat.pl

################################################################
## 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/

################################################################
## Path to the REST Web services
#WSGIScriptAlias /rest [RSAT_PARENT_PATH]/rsat/public_html/flask/rest.wsgi


################################################################
## Configuration for Apache 2.4

DirectoryIndex RSAT_home.cgi

################################################################
## Increase the default timeout to 1h.
## This option is required for the matrix-enrichment demo to work. 
TimeOut 3600

## 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/
    ## Axctivate handlers for the REST Web services
    MultiViewsMatch Handlers
    Options +ExecCGI +MultiViews +FollowSymLinks +Indexes
    AddHandler cgi-script .cgi
    AddHandler wsgi-script .wsgi .
    Require all granted
</Directory>

<Directory "[RSAT_PARENT_PATH]/rsat/public_html/data/">
    AllowOverride all
    Options +Indexes +FollowSymLinks
    Require all granted
</Directory>

<Directory "[RSAT_PARENT_PATH]/rsat/public_html/motif_databases/">
    AllowOverride all
    Options +Indexes +FollowSymLinks
    Require all granted
</Directory>

<Directory "[RSAT_PARENT_PATH]/rsat/public_html/tutorials/">
    AllowOverride all
    Options +Indexes +FollowSymLinks
    Require all granted
</Directory>

