|
1 | | -A few notes on Nginx configuration |
2 | | - |
3 | | - In general Nginx with websocket support is required |
4 | | - (I am using Nginx 1.4). It should work with Nginx 1.3 too. |
5 | | - |
6 | | - Add the following to your Nginx server section: |
7 | | - |
8 | | - location / { |
9 | | - proxy_pass http://localhost:8090; |
10 | | - proxy_http_version 1.1; |
11 | | - proxy_set_header Upgrade $http_upgrade; |
12 | | - proxy_set_header Connection $connection_upgrade; |
13 | | - proxy_set_header X-Forwarded-Proto $scheme; |
14 | | - proxy_set_header Host $http_host; |
15 | | - proxy_set_header X-Real-IP $remote_addr; |
16 | | - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
17 | | - } |
18 | | - |
19 | | - This is using a map to provide the Upgrade and Connection |
20 | | - headers to the backend server. You need to add this map to |
21 | | - the http section of your server: |
22 | | - |
23 | | - map $http_upgrade $connection_upgrade { |
24 | | - default upgrade; |
25 | | - '' close; |
26 | | - } |
27 | | - |
28 | | - Also make sure that you have the general proxy configuration |
29 | | - like this in place: |
30 | | - |
31 | | - proxy_buffering on; |
32 | | - proxy_ignore_client_abort off; |
33 | | - proxy_redirect off; |
34 | | - proxy_connect_timeout 90; |
35 | | - proxy_send_timeout 90; |
36 | | - proxy_read_timeout 90; |
37 | | - proxy_buffer_size 4k; |
38 | | - proxy_buffers 4 32k; |
39 | | - proxy_busy_buffers_size 64k; |
40 | | - proxy_temp_file_write_size 64k; |
41 | | - proxy_next_upstream error timeout invalid_header http_502 http_503 http_504; |
42 | | - |
43 | | - Thats it. |
44 | | - |
45 | | - -- |
46 | | - (c)2013 struktur AG |
| 1 | +## Nginx HTTP server configuration for Spreed WebRTC |
| 2 | + |
| 3 | +In general Nginx with websocket support is required (Nginx >= 1.3). |
| 4 | + |
| 5 | +Add the following to your Nginx server section: |
| 6 | + |
| 7 | + location / { |
| 8 | + proxy_pass http://localhost:8090; |
| 9 | + proxy_http_version 1.1; |
| 10 | + proxy_set_header Upgrade $http_upgrade; |
| 11 | + proxy_set_header Connection $connection_upgrade; |
| 12 | + proxy_set_header X-Forwarded-Proto $scheme; |
| 13 | + proxy_set_header Host $http_host; |
| 14 | + proxy_set_header X-Real-IP $remote_addr; |
| 15 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| 16 | + } |
| 17 | + |
| 18 | +This is using a map to provide the Upgrade and Connection |
| 19 | +headers to the backend server. You need to add this map to |
| 20 | +the http section of your server: |
| 21 | + |
| 22 | + map $http_upgrade $connection_upgrade { |
| 23 | + default upgrade; |
| 24 | + '' close; |
| 25 | + } |
| 26 | + |
| 27 | +Also make sure that you have the general proxy configuration |
| 28 | +like this in place: |
| 29 | + |
| 30 | + proxy_buffering on; |
| 31 | + proxy_ignore_client_abort off; |
| 32 | + proxy_redirect off; |
| 33 | + proxy_connect_timeout 90; |
| 34 | + proxy_send_timeout 90; |
| 35 | + proxy_read_timeout 90; |
| 36 | + proxy_buffer_size 4k; |
| 37 | + proxy_buffers 4 32k; |
| 38 | + proxy_busy_buffers_size 64k; |
| 39 | + proxy_temp_file_write_size 64k; |
| 40 | + proxy_next_upstream error timeout invalid_header http_502 http_503 http_504; |
| 41 | + |
| 42 | +And thats it. |
| 43 | + |
| 44 | +-- |
| 45 | +(c)2013 struktur AG |
47 | 46 |
|
48 | 47 |
|
49 | 48 |
|
|
0 commit comments