diff --git a/docs/OnlineInstallationGuide.md b/docs/OnlineInstallationGuide.md index 168fef5..78aacc2 100644 --- a/docs/OnlineInstallationGuide.md +++ b/docs/OnlineInstallationGuide.md @@ -21,7 +21,13 @@ node_modules/.bin/webpack 6. Adapt the following command to test the server: `/usr/bin/node /home/comunic/comunicapiv2/build/index.js /home/comunic/comunicapiv2/config.private.json` -7. Create Apache configuration, save it & restart Apache: +7. Enable required modules in Apache: +```bash +sudo a2enmod proxy_http +sudo a2enmod proxy_wstunnel +``` + +8. Create Apache configuration, save it & restart Apache: ```conf ServerName api.communiquons.org @@ -31,6 +37,12 @@ node_modules/.bin/webpack ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined + # Redirect user web socket + RewriteEngine On + RewriteCond %{REQUEST_URI} (.*)/ws$ [NC] + RewriteRule /ws ws://localhost:3005/ws [P,L] + + ProxyPreserveHost On ProxyRequests off AllowEncodedSlashes NoDecode @@ -43,7 +55,7 @@ node_modules/.bin/webpack ``` -8. Create systemd configuration (in `/etc/systemd/system/comunic.service`): +9. Create systemd configuration (in `/etc/systemd/system/comunic.service`): ```conf [Unit] Description=Comunic API Server @@ -70,7 +82,7 @@ HOME=/home/comunic WantedBy=multi-user.target ``` -9. Enable new configuration: +10. Enable new configuration: ```bash sudo systemctl enable comunic.service sudo systemctl start comunic.service