Forum

Reverse proxy to another Hiawatha server in another IP

Luis Mendes
13 January 2016, 13:24
Hi,

I want to have two websites being served from the same IP, although each website should have it's own jail [www.freebsd.org] and be served by its own Hiawatha webserver.
In the first (main) jail, I'm trying to set up ReverseProxy so that when http and https connections arrive they should be sent to the webserver at 192.168.0.6 (port 80 for http and port 443 for https).

Tried this:
VirtualHost {
Hostname = web2.eu, www.web2.eu
ReverseProxy .* http://192.168.0.6/
}

But when restarting there's an error saying:
A WebsiteRoot is missing for hinoavida.eu in hiawatha.conf
/usr/local/etc/rc.d/hiawatha: WARNING: failed to start hiawatha


For example, in this forum topic [www.hiawatha-webserver.org], there's a VirtualHost configuration without WebsiteRoot, exactly what I want.

Can or can't I have separate servers? How to do it?

Fred
26 January 2016, 19:36
Hi Luis,

I have the exact same setup on FreeBSD and here is my setup
VirtualHost {
Hostname = www.mynewdomain.com, mynewdomain.com, *.mynewdomain.com
ReverseProxy .* http://10.10.50.14/
AccessLogfile = /var/log/hiawatha/mynewdomain.access.log
ErrorLogfile = /var/log/hiawatha/mynewdomain.error.log
WebsiteRoot = /var/www/empty
}
Luis Mendes
4 February 2016, 18:03
Thanks Fred,

But now I have a endless redirection to solve... Maybe a subject for a new post.
This topic has been closed.