Skip to content

Commit

Permalink
sample nginx virtual server conf
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
  • Loading branch information
heipei committed May 21, 2013
1 parent 39dba53 commit 8360d4c
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This is a sample configuration for serving static assets through nginx while
# proxying socket.io requests to the node backend.

map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}

server {
listen 80;

root /usr/share/nginx/www/static;
index index.html index.htm;

server_name map.honeycloud.net;

location / {
try_files $uri $uri/ /index.html;
}

location /socket.io/ {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}

}

0 comments on commit 8360d4c

Please sign in to comment.