-
Notifications
You must be signed in to change notification settings - Fork 19
Installation
Thomas Hufschmidt edited this page May 4, 2015
·
30 revisions
##Installation Current release: v.0.7.3-alpha
- Download latest release version to a temporary folder:
wget https://github.com/hrz-unimr/Ilias.RESTPlugin/archive/v.0.7.3-alpha.zip
- Unzip the downloaded zip-file:
unzip v.0.7.3.zip
- Move all extracted files into your ILIAS folder:
mv RESTPlugin-v.0.7.3-alpha/* ${ILIAS_DIR}/
- [Optional] Create a log-file for the RESTPlugin under:
${ILIAS_LOG_DIR}/restplugin.log
- Update the database and activate the plugin by logging into ILIAS and navigating to:
Administration > Plugins > REST (Actions) > Update
Administration > Plugins > REST (Actions) > Activate
##Shortcut (Optional) For an Apache-Server, a shortcut from api.example.com/... to example.com/restplugin.php/... can be established using the following setup:
- Enable mod_rewrite:
[Windows] UncommentLoadModule rewrite_module modules/mod_rewrite.so
inside the apache config file. (eg. apache/conf/http.conf).
[Ubuntu] Download and install mod_rewrite viasudo apt-get install rewrite
andsudo a2enmod rewrite
.
[All] Restart Apache afterwards! - Add the following line to your web-sites VirtualHost:
Or your .htaccess file:
ServerAlias api.example.com <Directory "${ILIAS_DIR}"> RewriteEngine on RewriteCond %{HTTP_HOST} ^api.example.com [NC] RewriteCond %{REQUEST_URI} !^/Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/REST/apps/admin/ [NC] RewriteCond %{REQUEST_URI} !^/restplugin.php [NC] RewriteRule ^(.*)$ /restplugin.php/$1 [L] </Directory>
(Replace api.example.com with actual URL)RewriteEngine on RewriteCond %{HTTP_HOST} ^api.example.com [NC] RewriteCond %{REQUEST_URI} !^/Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/REST/apps/admin/ [NC] RewriteCond %{REQUEST_URI} !^/restplugin.php [NC] RewriteRule ^(.*)$ /restplugin.php/$1 [L]
- [Optional] Enable IP-Redirections from api.example.com to your localhost by adding an
127.0.0.1 api.example.com
entry to your hosts file, located at:
[Windows]%SystemRoot%\system32\drivers\etc\hosts
[Linux]/etc/hosts
##Notes
- The variables ${ILIAS_DIR} and ${ILIAS_LOG_DIR} should point to your ILIAS installation
directory (eg. /var/www/ilias) and the external logging directory set during ILIAS installation
(eg /var/log) respectively.
[Optional] The variable ${ILIAS_API_URL} stands for the RESTPlugins API-Endpoint URL-Shorthand, eg. api.example.com - On a unix-like operating-systems make sure the ILIAS and the plugin directory is readable and the log-file is writeable by the webserver. For example for an Apache-Server on Ubuntu use the following commands:
chown -R www-data:www-data ${ILIAS_DIR}/
chown www-data:www-data ${ILIAS_LOG_DIR}/restplugin.php
chmod -R 755 ${ILIAS_DIR}/
chmod -R 755 ${ILIAS_LOG_DIR}/restplugin.php
- To use the master-branch instead of a release version just replace all occurances of v.0.7.3-alpha and v.0.7.3 with master.