Merge branch 'doc-nginx' into 'develop'
Documentation for nginx See merge request raphj/trivabble!12
This commit is contained in:
commit
6878bebcd4
43
README.md
43
README.md
|
@ -135,9 +135,11 @@ We will assume www-data is the UNIX user of your Web server. Adapt if necessary.
|
|||
exec sudo -u www-data DEBUG_LOG=true nodejs trivabble-server.js
|
||||
```
|
||||
|
||||
8. Configure your web server.
|
||||
8. Configure your web server. In the next two sections, we describe the configuration for Apache 2 and Nginx.
|
||||
|
||||
On Apache 2, the relevant rules are:
|
||||
#### Apache 2
|
||||
|
||||
On Apache 2, the relevant rules are:
|
||||
|
||||
RewriteEngine on
|
||||
RewriteRule "^/?:trivabble/ws/(.*)" ws://localhost:3000/ws/$1 [P]
|
||||
|
@ -153,16 +155,47 @@ a2enmod proxy_wstunnel
|
|||
a2enmod rewrite
|
||||
```
|
||||
|
||||
A full example is available in (doc/trivabble-apache-host.conf.sample)[doc/trivabble-apache-host.conf.sample].
|
||||
|
||||
:warning: Be careful to allow enough concurrent processes / threads / workers on your web server.
|
||||
Each player requires one long-standing connection (XHR, SSE or WebSocket), plus small requests when not using WebSockets.
|
||||
Long-standing connections may cause issues with Apache 2, and using HTTP 2 may lead to "interesting" behavior.
|
||||
|
||||
### Nginx
|
||||
|
||||
Here is an example of an Nginx configuration for Trivabble:
|
||||
|
||||
```
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
|
||||
server_name trivabble.example.org;
|
||||
|
||||
location /:trivabble/ws/ {
|
||||
proxy_pass http://127.0.0.1:3000;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
proxy_set_header Host $host;
|
||||
}
|
||||
|
||||
location /:trivabble {
|
||||
proxy_pass http://127.0.0.1:3000;
|
||||
proxy_buffering off;
|
||||
}
|
||||
|
||||
location /trivabble {
|
||||
alias /var/www/html/trivabble-public;
|
||||
}
|
||||
|
||||
# SSL configuration here
|
||||
}
|
||||
```
|
||||
|
||||
## Enable the spell checker
|
||||
|
||||
This is an experimental feature. The process of building the dictionaries takes a lot of disk space.
|
||||
|
||||
Install `aspell` (to have the `word-list-compress` command) and run:
|
||||
Install `wget` and `aspell` (to have the `word-list-compress` command), and run:
|
||||
|
||||
```sh
|
||||
cd dict-dists-extractor
|
||||
|
|
Loading…
Reference in New Issue