From aa57c952f9500eb1c7db2ed9e45fbc56960e72be Mon Sep 17 00:00:00 2001 From: Michael Newton Date: Mon, 10 Aug 2015 10:43:11 -0700 Subject: [PATCH] adding documentation --- doc/Extensions/Sub-Directory.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 doc/Extensions/Sub-Directory.md diff --git a/doc/Extensions/Sub-Directory.md b/doc/Extensions/Sub-Directory.md new file mode 100644 index 0000000000..d79c07a450 --- /dev/null +++ b/doc/Extensions/Sub-Directory.md @@ -0,0 +1,22 @@ +To run LibreNMS under a subdirectory on your Apache server, the directives for the LibreNMS directory are placed in the base server configuration, or in a virtual host +container of your choosing. If using a virtual host, place the directives in the file where the virtual host is configured. If using the base server on RHEL distributions +(CentOS, Scientific Linux, etc.) the directives can be placed in `/etc/httpd/conf.d/librenms.conf`. For Debian distributions (Ubuntu, etc.) place the directives in +`/etc/apache2/sites-available/default`. + +```apache +#This directive is never put inside a virtual host +AllowEncodedSlashes On + +#These directives can be inside a virtual host or in the base server configuration +Alias /librenms /opt/librenms/html + + + AllowOverride All + Options FollowSymLinks MultiViews + +``` + +The `RewriteBase` directive in `html/.htaccess` must be rewritten to reference the subdirectory name. Assuming LibreNMS is running at http://example.com/librenms/, +you will need to change `RewriteBase /` to `RewriteBase /librenms`. + +Finally, ensure `$config["base_url"]` -- if configured -- is correct as well.