Skip to content

Commit

Permalink
added WebSocket support to Nginx cookbook recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 7, 2013
1 parent d8addd3 commit c071eb2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

3.90 2013-03-05
3.90 2013-03-08
- Improved dumper helper to sort hash keys.
- Improved documentation.

Expand Down
7 changes: 5 additions & 2 deletions lib/Mojolicious/Guides/Cookbook.pod
Expand Up @@ -129,8 +129,8 @@ timers.

=head2 Nginx

One of the most popular setups these days is the built-in web server behind a
Nginx reverse proxy.
One of the most popular setups these days is Hypnotoad behind a Nginx reverse
proxy, which even supports WebSockets in newer versions.

upstream myapp {
server 127.0.0.1:8080;
Expand All @@ -141,6 +141,9 @@ Nginx reverse proxy.
location / {
proxy_read_timeout 300;
proxy_pass http://myapp;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-HTTPS 0;
Expand Down

0 comments on commit c071eb2

Please sign in to comment.