From 1b409d37f517c8edc90bf3d5bf51db5ca5f11364 Mon Sep 17 00:00:00 2001 From: Nicolas Bareil Date: Fri, 10 Nov 2023 10:23:52 +0100 Subject: [PATCH 1/2] Document an Apache 2 deployment --- docs/deploy.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/docs/deploy.md b/docs/deploy.md index c5af1ca8c..35558b7fa 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -376,6 +376,41 @@ journalctl -u voila.service For more information, you can also follow [the guide on the nginx blog](https://www.nginx.com/blog/using-free-ssltls-certificates-from-lets-encrypt-with-nginx/). +### Using Apache2 as reverse proxy + +Apache can also be used to serve voilĂ . These Apache modules need to be installed and enabled: +- mod_proxy +- mod_rewrite +- mod_proxy_http +- mod_proxy_wstunnel + +With the following configuration: + +``` + + # ... + ProxyRequests Off + ProxyPreserveHost Off + + + RewriteEngine on + RewriteCond %{REQUEST_URI} /voila/api/kernels/ + RewriteRule .*/voila/(.*) "ws://127.0.0.1:50001/voila/$1" [P,L] + ProxyPreserveHost On + ProxyPass http://127.0.0.1:50001/voila/ + ProxyPassReverse http://127.0.0.1:50001/voila/ + + +``` + +For the record, Voila was instanciated with the following command line: + +``` +$ voila --autoreload=True --port=50001 --base_url=/voila/ +``` + +And clients can access the instance using https://myhost/voila/ + ## Sharing VoilĂ  applications with ngrok [ngrok](https://ngrok.com) is a useful tool to expose local servers to the public internet over secure tunnels. From feb6bc407ca4ebf360a440f76a274a8892e108c2 Mon Sep 17 00:00:00 2001 From: Nicolas Bareil Date: Fri, 10 Nov 2023 14:20:47 +0100 Subject: [PATCH 2/2] fmt --- docs/deploy.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/deploy.md b/docs/deploy.md index 35558b7fa..fb7910e13 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -392,14 +392,14 @@ With the following configuration: ProxyRequests Off ProxyPreserveHost Off - + RewriteEngine on RewriteCond %{REQUEST_URI} /voila/api/kernels/ RewriteRule .*/voila/(.*) "ws://127.0.0.1:50001/voila/$1" [P,L] ProxyPreserveHost On ProxyPass http://127.0.0.1:50001/voila/ ProxyPassReverse http://127.0.0.1:50001/voila/ - + ```