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

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.

permanent link

answered 31 Oct '11, 09:06

iliasr's gravatar image

iliasr ♦♦
accept rate: 36%

edited 31 Oct '11, 09:41

seanf's gravatar image

seanf ♦♦

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



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

Question tags:


question asked: 31 Oct '11, 08:50

question was seen: 2,642 times

last updated: 01 Nov '11, 08:08

Features & prices    Sign up    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
© Copyright 2003-2015 Swarma Limited - WebFaction is a service of Swarma Limited