apache config
Patrick McManus
mcmanus at appliedtheory.com
Fri Nov 2 10:55:57 EST 2001
yes, that's the normal way. a server binds to an IP and port
tuple.. you want the Listen directive in apache.conf.
keep followups on the list, please.
-P
[Anand A Rao: Fri, Nov 02, 2001 at 10:53:09AM -0500]
> Just another small question ..
>
> if my machine has two ipaddresses .. can I run two instances of apache
> listening at each of those ip and both running on port 80.
>
> is this possible.
>
> thanks in advance
> anand
>
>
> >
> > I'll state the obvious and say that it would be a lot easier to just
> > bind your apache's to the apropos interface (instead of * or 0.0.0.0),
> > run them all on port 80, and be done with it.. but if you want to do
> > this.. (and I once wanted to do a similar thing in order to run a
> > server in non-root (and therefore high numbered port) space without
> > any setuid games) iptables works well here..
> >
> > >
> > > http://192.168.1.1 for the one running on poert 80 on this machine
> >
> > by definition, that's what http://192.168.1.1 means.
> >
> > > http://192.168.1.2 for the instance listening on port say 8080
> >
> > iptables -t nat -A PREROUTING -p tcp --dst 192.168.1.2 --dport 80 -j
> > REDIRECT --to-port 8080
> >
> > that will map it to 192.168.1.2:8080
> >
> > if you want it mapped to 192.168.1.1:8080 the below would probably
> > work (this one isn't tested)
> >
> > iptables -t nat -A PREROUTING -p tcp --dst 192.168.1.2 --dport 80
> > --to-destination 192.168.1.1 -j REDIRECT --to-port 8080
> >
> >
> > > and http://192.168.1.2 for the instance listening on port 8100
> >
> > umm.. you just mapped 192.168.1.2:80 above.. you can't map it again.
>
>
More information about the Discuss
mailing list