Without getting into proxying, or port redirects, port forwards, etc, is there any native method to bind Resin (a Java server) to port 80, on an Ubuntu server, while Resin is started by root but then operates as an unprivileged user (www-data)?
This is on Ubuntu 10.10, running Resin from the caucho apt repository. I know if I run & operate Resin as root, I can make it use port 80, but as you can imagine, that's not ideal.
Found the answer, terminal cmds below. These commands assume you're running Ubuntu 10, and have installed Resin via it's apt repositories. In my case, www-data will be running authbind, with a userid of 33, which you'll see below:
While editing /etc/init.d/resin, find:
Below that, find:
Delete that line, replace with:
Find:
Below that, find:
Delete that line, replace with:
Write the file & exit (use CTRL+O, CTRL+X)
Now you need to edit resin config:
Make sure that your HTTP port is set to 80 (I believe it is as default, as Resin runs as rot by default), and make sure the following 2 lines are uncommented in the file as well:
www-data www-data
Save & exit (CTRL+O, CTRL+X)
Now start Resin: