I'd like to run node on port 80 (to allow the user to access a site without having to type a port number, and to avoid problems with socket.io when nginx then translates the port number from 80 into another port).

Is it possible to run node on port 80 with Webfaction?

asked 31 Oct '11, 08:50

AnnaPS's gravatar image

AnnaPS
77312
accept rate: 100%


No, we cannot give out port numbers below 1024, but many of our customers are using their node.js behind our frontend nginx server without any problem

If you are having issues with socket.io please let us know by raising a support ticket via our ticketing system or via the 'Support' menu item in the control panel.

link

answered 31 Oct '11, 09:06

iliasr's gravatar image

iliasr ♦♦
9364
accept rate: 32%

edited 31 Oct '11, 09:41

seanf's gravatar image

seanf ♦♦
8.0k1726

Yes, I'm using socket.io with node.js. I'd like to have a URL without a port number, but I think that nginx port translation means this is impossible. Fundamentally, can you tell me, is it possible to run node.js + socket.io without specifying the port number in the URL on Webfaction?

(31 Oct '11, 12:29) AnnaPS AnnaPS's gravatar image

No, sorry. "without specifying the port number" means that you'd be using the default port (80). Port 80 is used by the front-end Nginx proxy which runs in front of all customer sites.

The fundamental problem with running a Websocket server behind Nginx is that Nginx doesn't speak HTTP 1.1 on the back end. Socket.io and other websocket servers require HTTP 1.1, so running them behind Nginx simply does not work.

(31 Oct '11, 13:09) seanf ♦♦ seanf's gravatar image

OK, no worries, thanks for clarifying!

(01 Nov '11, 06:18) AnnaPS AnnaPS's gravatar image

I don't suppose you could use tcp_proxy as described here? http://www.letseehere.com/reverse-proxy-web-sockets

(01 Nov '11, 07:19) AnnaPS AnnaPS's gravatar image

Sorry but this won't be possible either - it requires a custom Nginx module; furthermore we cannot include custom directives in the Nginx configuration file either.

(01 Nov '11, 07:30) todork todork's gravatar image

Thanks anyway.

(01 Nov '11, 08:08) AnnaPS AnnaPS's gravatar image
showing 5 of 6 show 1 more comments
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×157
×9
×7

Asked: 31 Oct '11, 08:50

Seen: 1,783 times

Last updated: 01 Nov '11, 08:08

Plans & prices    Sign up    Why WebFaction?    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited