Web server redirection

12 February 2008, 00:36
I have two webserver on my LAN.
One running hiawatha and another one running Zimbra Suite.
I would like access Zimbra server from the web.
Port forwarding is enebaled on my firewall and http requests are forwarded to hiawatha machine.
Because Zimbra can only run on apache webserver i want to redirect Zimbra http request from hiawatha to Zimbra server.
I think that adding a virtual host for Zimbra on hiawatha should be right but what i have to specify for WebsiteRoot and Hostname parameters?

Thanks in advance


Hugo Leisink
12 February 2008, 10:03
What you want is not something a webserver can do. If you want to make your webserver inside your LAN reachable for clients on the internet, you must adjust your firewall (the port forwarding rules). The only redirecting/forwarding a webserver can do is via 301 responses and a Location HTTP header field. But that still requires the other webserver to be reachable from the internet.
12 February 2008, 10:26
Sorry for not better explanation. I try to be more clear.

Port forwarding configuration is good. Hiawatha machine is already reacheable for clients on the internet. But i have a 1-to-1 WAN connection (only 1 public IP) so i can have no more than one web server accepting http request.

So, how can i redirect the http request for ZIMBRA to the ZIMBRA machine????


Hugo Leisink
12 February 2008, 10:41
I do understand what you want. But that just ain't something a webserver can do.

You probably have PUBLIC_UP:80 forwarded to the Hiawatha webserver. So, all requests forwarded to Hiawatha, will be handled by Hiawatha. Hiawatha is a webserver, not a proxy or port forwarder. If you have only 1 public IP, the only thing you can do is forward another port to the Zimba machine, for example port 81. You can then make Hiawatha print a 301 with a Location HTTP header to the other port:

HTTP/1.0 301 Moved Permanently
Location: http://<PUBLIC_IP>:81/...

Another thing you can do is let a CGI process forward the HTTP request to the Zimbra webserver and print the result of the request.
12 February 2008, 10:49
Thanks a lot.

I learn something new every day.

Hugo Leisink
12 February 2008, 10:51
You're welcome. If you have any more questions, just ask. Remember: there are no stupid questions, only stupid answers.
13 February 2008, 13:35
May be a good idea to install Pound reverse proxy on the hiawatha machine.

Pound is a reverse-proxy load balancing server.
It accepts requests from HTTP / HTTPS clients and distributes them to one or more Web servers.
The HTTPS requests are decrypted and passed to the back-ends as plain HTTP.

What is your opnion?
Hugo Leisink
13 February 2008, 14:00
A reverse proxy is a good solution for your problem. I don't know Pound, but I've taken a quick look at it and I think it looks oke. You can forward HTTP requests based on the virtual host.
Jason Grossman
26 March 2008, 12:53
I use pound ... not for this, but for other things. Anyway, I find it's fast and reliable.
This topic has been closed.