|
|
|
@ -1,32 +1,31 @@
@@ -1,32 +1,31 @@
|
|
|
|
|
A few notes on Nginx configuration |
|
|
|
|
## Nginx HTTP server configuration for Spreed WebRTC |
|
|
|
|
|
|
|
|
|
In general Nginx with websocket support is required |
|
|
|
|
(I am using Nginx 1.4). It should work with Nginx 1.3 too. |
|
|
|
|
In general Nginx with websocket support is required (Nginx >= 1.3). |
|
|
|
|
|
|
|
|
|
Add the following to your Nginx server section: |
|
|
|
|
Add the following to your Nginx server section: |
|
|
|
|
|
|
|
|
|
location / { |
|
|
|
|
proxy_pass http://localhost:8090; |
|
|
|
|
proxy_http_version 1.1; |
|
|
|
|
proxy_set_header Upgrade $http_upgrade; |
|
|
|
|
proxy_set_header Connection $connection_upgrade; |
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme; |
|
|
|
|
proxy_set_header Host $http_host; |
|
|
|
|
proxy_set_header X-Real-IP $remote_addr; |
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|
|
|
|
} |
|
|
|
|
location / { |
|
|
|
|
proxy_pass http://localhost:8090; |
|
|
|
|
proxy_http_version 1.1; |
|
|
|
|
proxy_set_header Upgrade $http_upgrade; |
|
|
|
|
proxy_set_header Connection $connection_upgrade; |
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme; |
|
|
|
|
proxy_set_header Host $http_host; |
|
|
|
|
proxy_set_header X-Real-IP $remote_addr; |
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
This is using a map to provide the Upgrade and Connection |
|
|
|
|
headers to the backend server. You need to add this map to |
|
|
|
|
the http section of your server: |
|
|
|
|
This is using a map to provide the Upgrade and Connection |
|
|
|
|
headers to the backend server. You need to add this map to |
|
|
|
|
the http section of your server: |
|
|
|
|
|
|
|
|
|
map $http_upgrade $connection_upgrade { |
|
|
|
|
default upgrade; |
|
|
|
|
'' close; |
|
|
|
|
} |
|
|
|
|
map $http_upgrade $connection_upgrade { |
|
|
|
|
default upgrade; |
|
|
|
|
'' close; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Also make sure that you have the general proxy configuration |
|
|
|
|
like this in place: |
|
|
|
|
Also make sure that you have the general proxy configuration |
|
|
|
|
like this in place: |
|
|
|
|
|
|
|
|
|
proxy_buffering on; |
|
|
|
|
proxy_ignore_client_abort off; |
|
|
|
@ -40,10 +39,10 @@ A few notes on Nginx configuration
@@ -40,10 +39,10 @@ A few notes on Nginx configuration
|
|
|
|
|
proxy_temp_file_write_size 64k; |
|
|
|
|
proxy_next_upstream error timeout invalid_header http_502 http_503 http_504; |
|
|
|
|
|
|
|
|
|
Thats it. |
|
|
|
|
And thats it. |
|
|
|
|
|
|
|
|
|
-- |
|
|
|
|
(c)2013 struktur AG |
|
|
|
|
-- |
|
|
|
|
(c)2013 struktur AG |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|