Skip to content

Commit

Permalink
Documentation: Adds deployment instructions for Apache2 as reverse pr…
Browse files Browse the repository at this point in the history
…oxy (#1418)

* Document an Apache 2 deployment

* fmt
  • Loading branch information
nbareil committed Nov 14, 2023
1 parent 089c9f3 commit 2eca6f1
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions docs/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

```
<VirtualHost *:443>
# ...
ProxyRequests Off
ProxyPreserveHost Off
<LocationMatch "/voila/">
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/
</LocationMatch>
</VirtualHost>
```

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.
Expand Down

0 comments on commit 2eca6f1

Please sign in to comment.