Re: running resin as non-root usr

Knut Forkalsrud <[email protected]> Tue, 09 May 2006 14:30:05 -0700
Newsgroups gmane.text.xml.resin.user
Organization Commission Junction
Message-ID <[email protected]>
"Erik Beeson" <[email protected]> writes:

> As is stated in that old thread that I linked to. So what's the
> recommended way to run on port 80 as non-root without running
> another webserver (like apache) out infront, and without port
> forward/redirecting that makes all the access logs appear to come
> from localhost?

There is a FAQ entry for that, at least for Linux users:

http://www.caucho.com/resin-3.0/install/faq.xtp#How-can-I-bind-to-a-port-under-1024-and-still-run-as-a-non-root-user?

For some reason (I don't remember exactly why) I ended up with two
iptables entries like this:


iptables -t nat -A OUTPUT             --destination $MYIP \
            -p tcp --dport 80 -j REDIRECT --to-ports 8080
iptables -t nat -A PREROUTING -i eth+ --destination $MYIP \
            -p tcp --dport 80 -j REDIRECT --to-ports 8080


-Knut