From 5f77d92076d69e28954925ecaea00f53b058a581 Mon Sep 17 00:00:00 2001 From: Craig Kaiser <32553647+craigkai@users.noreply.github.com> Date: Fri, 24 Apr 2020 01:45:11 -0400 Subject: [PATCH] Add install instructions for self hosted using Apache2 (#448) --- SELF_HOSTING.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/SELF_HOSTING.md b/SELF_HOSTING.md index 857b17e3..072a85cb 100644 --- a/SELF_HOSTING.md +++ b/SELF_HOSTING.md @@ -77,6 +77,30 @@ server { sudo service nginx reload ``` +### Configure Apache2 + +1. Install Apache2 and install/enable mod_proxy. +2. Create a new file in `/etc/apache2/sites-available/dnote.conf` with the following contents: + +``` + + ServerName notes.example.com + + ProxyRequests Off + ProxyPreserveHost On + ProxyPass / http://127.0.0.1:3000/ keepalive=On + ProxyPassReverse / http://127.0.0.1:3000/ + RequestHeader set X-Forwarded-HTTPS "0" + +``` + +3. Enable the dnote site and restart the Apache2 service by running the following: + +``` +a2ensite dnote +sudo service apache2 restart +``` + Now you can access the Dnote frontend application on `/`, and the API on `/api`. ### Configure TLS by using LetsEncrypt