Forward port 80 requests to jail?

I have a cheap linksys router that will do port forwarding. That works great for one website/domain on my FreeBSD 7.1 system, but I've setup a jail with another website and different domain. How can I redirect requests to this second domain from within FreeBSD?
 
You can't. I'm assuming you only have one public Internet IP address. You cannot forward the same port to different machines. The only way to do it is to forward some other port, i.e. 81, to your second website.

Another way to do it is to set up one apache server that serves two name based virtual hosts. Both domainnames will point to the same IP address. This of course means both websites need to be served from the same host or jail.
 
Another option is setup ngnix or lighttpd on main host and then redirect all requests to different jail or hosts with one public IP.
 
vivek,
I looked at ngnix and lighttpd. It looks like lighttpd is in the port collection, but I couldn't find much documentation on it. I'm assuming I'll install this on the host? Can you provide some help or redirect me to some docs? Thanks.
 
Pound looks like something I can use, but I can't find much in the way of config examples. I looked in the man pages, but need some help.
I want to serve 2 websites (on from FreeBSD host and one is a jail).
Can someone send me some examples for this?
thanks
 
Back
Top