Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions docs/user-guides/apache-subfolder.md
Original file line number Diff line number Diff line change
@@ -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/"

<Directory "/var/www/sonerezh/">
Options FollowSymLinks
AllowOverride All
</Directory>

```

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
<IfModule mod_rewrite.c>
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