This is probably obvious to everyone but me, however I'll put it here in case there is another who finds it helpful.
The following redirects requests from 80 to 8080, meaning you don't have to run your
webapp as root or have annoying urls such as http://localhost:1234/myapp.
Jono@moose:xinetd.d $pwd
/etc/xinetd.d
Jono@moose:xinetd.d $cat redirect
service www
{
socket_type = stream
wait = no
nice = 10
user = root
server = /usr/bin/nc
server_args = -w 3 localhost 8080
instances = 40
}
The following redirects requests from 80 to 8080, meaning you don't have to run your
webapp as root or have annoying urls such as http://localhost:1234/myapp.
Jono@moose:xinetd.d $pwd
/etc/xinetd.d
Jono@moose:xinetd.d $cat redirect
service www
{
socket_type = stream
wait = no
nice = 10
user = root
server = /usr/bin/nc
server_args = -w 3 localhost 8080
instances = 40
}


1 Comments:
you'll probably want to do the following as well.
sudo /sbin/service --list
sudo /sbin/service redirect start
Post a Comment
<< Home