-
Notifications
You must be signed in to change notification settings - Fork 54
Install Guide
Download Anafora somewhere to your server (e.g., /var/www/anafora/
) by either:
- Cloning the Anafora repository, or
- Downloading and unzipping the latest Anafora release
You will need to make changes to your Apache configuration file (e.g., /etc/apache2/apache2.conf
) to point Apache the Django framework and to select the type of authentication for Anafora to use.
Add the following to your Apache configuration file (e.g., /etc/apache2/apache2.conf
)
Alias /anafora/static /path_to_anafora/src/main/static
WSGIScriptAlias /anafora /path_to_anafora/src/main/web/wsgi.py
WSGIPythonPath /path_to_anafora/src/main
This will:
- Make available all the static files (JavaScript, CSS, images, etc.) which are not handled by Django
- Identify the Django script that should be used by
mod_wsgi
- Place the Anafora code on the
PYTHONPATH
so that it can be found bymod_wsgi
If you are using digest authentication, enable mod_auth_digest if it is not already enabled, then create an anafora.htdigest file, and add something like the following to your Apache configuration file:
<Location /anafora>
AuthType Digest
AuthName "anafora"
AuthDigestProvider file
AuthUserFile /path_to_anafora/anafora.htdigest
Require valid-user
</Location>
If you are using LDAP authentication, enable mod_authnz_ldap if it is not already enabled, then comment out the line with 'annotate.anaforaAuthMiddleware.AnaforaAuthMiddleware'
in /path_to_anafora/src/main/web/settings.py
, and add something like the following to your Apache configuration file:
<Location /anafora>
AuthType Basic
AuthName "anafora"
AuthBasicProvider ldap
AuthLDAPURL "ldap://ldap.example.com:389/o=example.com"
Require valid-user
</Location>
You will need to modify Anafora's settings.py
file and configure permissions for the projects directory where annotated corpora will be stored.
Edit the following variables in /path_to_anafora/src/main/web/settings.py
:
-
ROOT_URL
: Setting the path to access your Anafora site. ex: '/anafora' -
SECRET_KEY
: Enter a secret string, and never share with anyone else -
TEMPLATE_DIRS
: The path to the template directory, ex:/path_to_anafora/src/Templates
-
ANAFORA_PROJECT_FILE_ROOT
: Path to the project file root directory. ex: /path_to_anafora/sample data/sampleanaforaprojectfile` -
GROUP_FILE
: Assign this value if you use the HTDIGEST auth. Otherwise, comment this line. The group file format is followed by the Apache auth_group_file format. -
ADMIN_GROUPNAME
: Assign the name of the administrator group. -
ANAFORA_PROJECT_SETTING_FILENAME
: Assign the file name that had the data repository setting file which must be located on the root of the repository directory.
More details are provided in the Anafora Manual, but in short:
chgrp -R anaforaadmin *
setfacl -R -m u:nobody:rwx *
chmod -R 770 *
find -type d -exec chmod g+s {} \;
You may need to use www-data
instead of nobody
depending on your Apache configuration.
Test your installation by visiting http://your_domain/anafora