-
Notifications
You must be signed in to change notification settings - Fork 19
Installation
Thomas Hufschmidt edited this page Apr 1, 2015
·
30 revisions
##Installation Current release: v.0.7.3-alpha
- Create the required folder structure inside your ILIAS installation:
mkdir -p ${ILIAS_DIR}/Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/ - Open the newly created directory:
cd ${ILIAS_DIR}/Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/ - Download latest release version of the RESTPlugin to this directory:
wget https://github.com/hrz-unimr/Ilias.RESTPlugin/archive/v.0.7.3-alpha.zip - Simply unzip the downloaded zip-file to its current location:
unzip v.0.7.3.zip - Rename the extracted folder, such that it can be loaded by ILIAS:
mv RESTPlugin-v.0.7.3-alpha REST - Copy the actual interface for the RESTController into your ILIAS base folder:
cp REST/gateways/restplugin.php ${ILIAS_DIR}/ - Create the ${ILIAS_LOG_DIR}/restplugin.log file
- You can now update your database and activate the plugin under Administration > Plugins from inside of ILIAS
##Shortcut (Optional) For Apache-Servers, a shortcut to http://api.example.de can be setup using the following virtualhost and mod_rewrite settings:
-
Enable mod_rewrite by searching and uncommenting the following line in your apache config. (apache/conf/http.conf)
LoadModule rewrite_module modules/mod_rewrite.so
-
Make sure the apache virtualhost config is included in your apache config file, by uncommenting:
Include conf/extra/httpd-vhosts.conf
-
Add the following line to your apache virtualhost config (apache/conf/extra/httpd-vhosts.conf):
<VirtualHost *:80> DocumentRoot /path/to/ilias ServerName api.example.de RewriteEngine on RewriteRule ^/(.*)$ /restplugin.php/$1 [PT] </VirtualHost>
It it important to use mod_rewrite and the [PT] PathThrough flag, since otherwise $_SERVER['SCRIPT_NAME'] might be empty otherwise.
Alternatively add the following just before </IfModule>> in the .htaccess file provided by ILIAS:
RewriteCond %{HTTP_HOST} ^api.example.de
RewriteRule ^/(.*)$ /restplugin.php/$1 [PT]
##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.
The log directory can also be retrieved by looking at the path-variable under the [log] section inside your ${ILIAS_DIR}/ilias.ini.php file. - On a unix-like operating-systems make sure the plugin directory ${ILIAS_DIR}/Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/REST is readable and the log-file ${ILIAS_LOG_DIR}/restplugin.log is writeable by the apache process. Normally this means the www-data user/group needs read or write access to those directories accordingly.
- 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.