updated scaling documentation to reflect new nginx config

This commit is contained in:
Julian Lam 2017-02-13 09:25:32 -05:00
parent 5f035f3679
commit adee6cf8b9
2 changed files with 44 additions and 15 deletions

View file

@ -54,15 +54,22 @@ blocks:
proxy_pass http://127.0.0.1:4567;
}

location ~ ^/(images|sounds|templates|uploads|vendor|src\/modules|nodebb\.min\.js|stylesheet\.css|admin\.css) {
root /path/to/nodebb/public/;
try_files $uri $uri/ @nodebb;
location ~ ^/assets/(.*) {
root /path/to/nodebb/;
try_files /build/public/$1 /public/$1 @nodebb;
}

location /plugins/ {
root /path/to/nodebb/build/public/;
try_files $uri @nodebb;
}

location / {
proxy_pass http://io_nodes;
}

**Note**: This configuration is only applicable to NodeBB versions v1.4.3 and above.

Furthermore, you can instruct Nginx to serve these assets compressed:

gzip on;
@ -105,9 +112,14 @@ Sample Nginx configuration with all of the above applied
proxy_pass http://io_nodes;
}

location ~ ^/(images|language|sounds|templates|uploads|vendor|src\/modules|nodebb\.min\.js|stylesheet\.css|admin\.css) {
root /path/to/nodebb/public/;
try_files $uri $uri/ @nodebb;
location ~ ^/assets/(.*) {
root /path/to/nodebb/;
try_files /build/public/$1 /public/$1 @nodebb;
}

location /plugins/ {
root /path/to/nodebb/build/public/;
try_files $uri @nodebb;
}

location / {
@ -115,6 +127,8 @@ Sample Nginx configuration with all of the above applied
}
}

**Note**: This configuration is only applicable to NodeBB versions v1.4.3 and above.

Configure Redis
---------------

@ -126,7 +140,7 @@ as datastore and Redis for pubsub looks like this. When configured like
this Redis will also be used as the session store.

{
"url": "<http://example.org>",
"url": "http://example.org",
"secret": "your-secret-goes-here",
"database": "mongo",
"port": [4568,4569],

View file

@ -60,15 +60,23 @@ Your Nginx config will need to be modified add the following
proxy_pass http://127.0.0.1:4567;
}

location ~ ^/(images|sounds|templates|uploads|vendor|src\/modules|nodebb\.min\.js|stylesheet\.css|admin\.css) {
root /path/to/nodebb/public/;
try_files $uri $uri/ @nodebb;
location ~ ^/assets/(.*) {
root /path/to/nodebb/;
try_files /build/public/$1 /public/$1 @nodebb;
}

location /plugins/ {
root /path/to/nodebb/build/public/;
try_files $uri @nodebb;
}

location / {
proxy_pass http://io_nodes;
}

**Note**: This configuration is only applicable to NodeBB versions
v1.4.3 and above.

Furthermore, you can instruct Nginx to serve these assets compressed:

::
@ -97,7 +105,6 @@ Sample Nginx configuration with all of the above applied

proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_redirect off;
@ -116,9 +123,14 @@ Sample Nginx configuration with all of the above applied
proxy_pass http://io_nodes;
}

location ~ ^/(images|language|sounds|templates|uploads|vendor|src\/modules|nodebb\.min\.js|stylesheet\.css|admin\.css) {
root /path/to/nodebb/public/;
try_files $uri $uri/ @nodebb;
location ~ ^/assets/(.*) {
root /path/to/nodebb/;
try_files /build/public/$1 /public/$1 @nodebb;
}

location /plugins/ {
root /path/to/nodebb/build/public/;
try_files $uri @nodebb;
}

location / {
@ -126,6 +138,9 @@ Sample Nginx configuration with all of the above applied
}
}

**Note**: This configuration is only applicable to NodeBB versions
v1.4.3 and above.

Configure Redis
---------------

@ -139,7 +154,7 @@ configured like this Redis will also be used as the session store.
::

{
"url": "<http://example.org>",
"url": "http://example.org",
"secret": "your-secret-goes-here",
"database": "mongo",
"port": [4568,4569],