WebFaction
Community site: login faq

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
1071920
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 ♦♦
1.9k14
accept rate: 36%

edited 31 Oct '11, 09:41

seanf
12.1k21635

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

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

OK, no worries, thanks for clarifying!

(01 Nov '11, 06:18) AnnaPS

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

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

Thanks anyway.

(01 Nov '11, 08:08) AnnaPS
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

Question tags:

×185
×14
×10

question asked: 31 Oct '11, 08:50

question was seen: 4,067 times

last updated: 01 Nov '11, 08:08

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2016 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM