From b85b54aca42920fc5f40674917645e5fe111b888 Mon Sep 17 00:00:00 2001
From: Nizhile <11645217+Nizhile@users.noreply.github.com>
Date: Fri, 8 Feb 2019 17:18:26 +0100
Subject: [PATCH] Add some hints for apache subfolder installation
---
docs/user-guides/apache-subfolder.md | 40 ++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
create mode 100644 docs/user-guides/apache-subfolder.md
diff --git a/docs/user-guides/apache-subfolder.md b/docs/user-guides/apache-subfolder.md
new file mode 100644
index 0000000..9cb9fca
--- /dev/null
+++ b/docs/user-guides/apache-subfolder.md
@@ -0,0 +1,40 @@
+# Apache Subfolder install
+
+In case you want to run Sonerezh in a subfolder of your
+existing website, here are some hints to get it work.
+
+First extract sonerezh from archive, for example in `/var/www/sonerezh/`
+
+In directory `/etc/apache2/conf.d/` create a file `sonerezh.conf`
+with the following content.
+
+```apache2
+Alias "/sonerezh/" "/var/www/sonerezh/"
+
+
+ Options FollowSymLinks
+ AllowOverride All
+
+
+```
+
+Then update the files .htaccess to add directive `RewriteBase` for the subfolder.
+* sonerezh/.htaccess
+* sonerezh/app/.htaccess
+* sonerezh/app/webroot/.htaccess
+
+Be careful, as the three files are different below the `RewriteEngine` directive.
+
+```apache2
+
+ RewriteEngine on
+ RewriteBase /sonerezh
+```
+
+Once done, setup the permission for your apache2 user
+`chown www-data:www-data -R /var/www/sonerezh/`
+
+Reload Apache configuration with `service apache2 reload`
+
+Access Sonerezh by using http://yoursite/sonerezh/
+Access your website as usual