Hiawatha version: 8.2
Operating System: FreeBSD 9.0-RELEASEp2
I am planning to switch from Pound/Apache to Nginx/Hiawatha, but since Hiawatha now has reverse proxy functionality I can eliminate Nginx. However, I am unsure of what I would need in hiawatha.conf.
This is part of the nginx.conf to handle reverse proxying now:
server {
listen 192.168.1.104:80;
server_name mydomain.com www.mydomain.com;
access_log /var/log/nginx/mydomain.com.access.log ;
error_log /var/log/nginx/mydomain.com.error.log ;
location / {
proxy_pass http://192.168.1.101:8080/ ;
include /usr/local/etc/nginx/proxy.conf;
}
}
And in my current hiawatha.conf for the relevant sections
Binding {
Port = 80
Interface = 192.168.1.26
}
Binding {
BindingID = BIND1
Interface = 192.168.1.101
Port = 8080
}
VirtualHost {
Hostname = www.mydomain.com
WebsiteRoot = /var/www/domains/www.mydomain.com/htdocs
RequiredBinding = BIND1
StartFile = index.html
AccessLogfile = /var/www/domains/www.mydomain.com/logs/access.log
ErrorLogfile = /var/www/domains/www.mydomain.com/logs/error.log
}
So I have nginx listening on 1.104 and hiawatha listening on 1.26 and when a request for www.mydomain.com comes in on 1.104 on nginx, it is redirected to hiawatha which serves the VirtualHost mydomain.com on 1.101:8080.
How would I be able to do that with Hiawatha using ReverseProxy and Hiawatha also serving the Virutal Hosts?