From 04d5d8eafbfc6fe137d1826b5d73e062cbfa6ff3 Mon Sep 17 00:00:00 2001
From: Sonia Zorba <sonia.zorba@inaf.it>
Date: Wed, 26 Jun 2019 10:35:36 +0200
Subject: [PATCH] Updated installation information

---
 .gitignore |  4 ++++
 README.md  | 27 ++++++++++++++++++++++++---
 2 files changed, 28 insertions(+), 3 deletions(-)
 create mode 100644 .gitignore

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..e30050e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+composer.lock
+config.php
+logs/
+vendor/
diff --git a/README.md b/README.md
index 4e425b9..6912d4d 100644
--- a/README.md
+++ b/README.md
@@ -7,6 +7,11 @@ Requirements:
 * Apache httpd server (tested on Apache/2.4.6)
 * PHP (5.4+), composer for dependecies
 * MySQL/MariaDB (tested on MariaDB 5.5.52)
+* PHP MySQL module
+
+On Ubuntu:
+
+    sudo apt install apache2 mariadb-server libapache2-mod-php mariadb-server
 
 ### PHP
 
@@ -18,7 +23,7 @@ For installing PHP dependencies run:
 
 Install also the bcmath PHP package (used in X.509 parser).
 
-### MySQL
+### MySQL / MariaDB
 
 Create a dedicated database and user:
 
@@ -28,8 +33,8 @@ Create a dedicated database and user:
 
 Enable the event scheduler:
 
-* open MySQL configuration file (e.g. /etc/my.cnf)
-* set `event_scheduler=1`
+* open MySQL configuration file (e.g. /etc/my.cnf, or /etc/mysql/mariadb.conf.d/*-server.cnf for MariaDB)
+* under the section [mysqld] set `event_scheduler=1`
 * restart MySQL
 
 Then run the setup script:
@@ -38,6 +43,15 @@ Then run the setup script:
 
 ### Apache (httpd)
 
+* Enable .htaccess in rap folder:
+
+In Apache configuration (e.g. /etc/apache2/apache2.conf) add:
+
+    <Directory /var/www/html/rap-ia2/>
+        AllowOverride All
+    </Directory>
+
+* Enable Apache mod rewrite: `sudo a2enmod rewrite`
 * Configure a valid HTTPS certificate on the server
 * Configure X.509 client certificate authentication:
 
@@ -94,6 +108,13 @@ Before using social API it is necessary to register an application on each socia
 
 Copy the `config-example.php` into `config.php` and edit it for matching your needs.
 
+### Logs directory
+
+Create the logs directory and assign ownership to the Apache user (usually www-data or apache)
+
+    mkdir logs
+    sudo chown www-data logs
+
 ## Additional information and developer guide
 
 See the wiki: https://www.ict.inaf.it/gitlab/zorba/rap-ia2/wikis/home
-- 
GitLab