How to specify Azure VM default port to use when entering URL without port number

260 Views Asked by At

So I've got a Meteor application deployed on a Azure VM (Ubuntu) that can be accessed via http://.cloudapp.net:3000/

I have a domain name and I want to create a CNAME record to point to my Azure VM.

The problem is CNAME doesn't let you specify a port, only a URL ( http://www.windowsazure.com/en-us/develop/net/common-tasks/custom-dns/ )

So I can't put in http://.cloudapp.net:3000/.

How can I tell my Azure VM that when I go to http://.cloudapp.net, it should automatically be port 3000 unless otherwise specified?

1

There are 1 best solutions below

5
On BEST ANSWER

Run your meteor instance with the environmental variable PORT=80 or (meteor --port 80 --production). Also It might be better if you didn't just use meteor to run your app. You would get more performance out if you bundled it with

meteor bundle app.tar.gz

Then unbundle this on your ubuntu server and follow the instructions in the README to get it running.