I want to write a tiny RESTful server in some language that can run on Ubuntu 10.04, but I have no idea how to host it.
Currently I have a VPS at Linode.com (Disclaimer: referral code) with nginx, I might have Apache running as well but not configured correctly, running that serves some public websites (Wordpress).
Does that mean port 80 is taken? How should I host my application to be able to handle urls like http://myip/User/Zolomon for instance?
Do I have to communicate with nginx in some way, since I suppose it's what handles the URL?
You'll first need to find out if port 80 is taken. Likely, given that you're running NGINX (and maybe Apache), port 80 is already used on this machine. You can find out quite easily by running
netstat
the following snippet will give you just a list of the ports currently in use on your server.Should produce something like this:
Without knowing exactly how you're written this RESTful application it'll be hard to say how you should hook it up. If it comes bundled with it's own standalone webserver, or if you're using something like Tomcat, C# WebServer, or Cherrpy; then you will need to configure the application to use a port other than the ones listed in the output from the command. Some popular alternative web ports are
8080
,8081
, and most values in the9000
range. Once you change that port in your Applications configuration and launch it, you'll be able to access it athttp://youip:PORT/User/Zolomon
wherePORT
is the number you chose.If this is an application that needs Web Server software to be installed, you'll need to setup a Virtual Host definition in either NGINX or Apache (whichever you're using) so that the Application will be run when you access it via
http://youip/User/Zolomon
but setting up the specifics for that seem to be out of scope for the question you've asked.