I am considering moving from Apache to Hiawatha or lighttpd, but have a question about virtual hosts. Currently with Apache I use IP-based virtual hosting, but looking at the configuration examples for both Hiawatha and lighttpd it seems it searches for a match until found.
Does that mean I would no longer need my Pound reverse proxy and multiple IPs to serve multiple sites? So my firewall will redirect port 80 to my NAT'd address which is bound for Hiawatha, for example, and then it searches through the config file for a match of a domain name until found?
Because presently I rdr for port 80 to Pound and then Pound sends requests to the correct NAT'd IP for the correct domain.
Am I correct or incorrect about my assumption for virtual hosting with Hiawatha and lighttpd?
This is the virtual host configuration example from the Hiawatha site.
This is an example I found for lighttpd which seems similar for other examples for using vhosts with it.
I don't see anywhere to use an IP to listen for something from Pound. I know I asked above, but would this eliminate using multiple IPs and no more Pound reverse proxy?
This is how I currently do it for Pound:
And for Apache I do:
Does that mean I would no longer need my Pound reverse proxy and multiple IPs to serve multiple sites? So my firewall will redirect port 80 to my NAT'd address which is bound for Hiawatha, for example, and then it searches through the config file for a match of a domain name until found?
Because presently I rdr for port 80 to Pound and then Pound sends requests to the correct NAT'd IP for the correct domain.
Am I correct or incorrect about my assumption for virtual hosting with Hiawatha and lighttpd?
Code:
# VIRTUAL HOSTS
VirtualHost {
RequiredBinding = LOCALSGS
Hostname = 127.0.0.1
WebsiteRoot = /home/pvg/webdmn/www/hiawatha
UseFastCGI = FCGI1
TimeForCGI = 20
UseToolkit = to_fcgi
}
VirtualHost {
RequiredBinding = HTTP
Hostname = www.ssl.example.net
WebsiteRoot = /home/pvg/webdmn/www/hiawatha/www/server
}
VirtualHost {
RequiredBinding = SSL
Hostname = www.nossl.example.net
WebsiteRoot = /home/pvg/webdmn/www/hiawatha
UseFastCGI = FCGI1
TimeForCGI = 20
UseToolkit = to_fcgi
PasswordFile = digest:/home/pvg/hiawatha/.digest
}
Code:
$HTTP["host"] == “test1.example.org†{
server.document-root = “/home/user/sites/test1.example.org/â€
accesslog.filename = “/home/user/sites/logs/test1.example.org.access.logâ€
}
$HTTP["host"] == “test2.example.org†{
server.document-root = “/home/user/sites/test2.example.orgâ€
accesslog.filename = “/home/user/sites/logs/test2.example.org.access.logâ€
}
I don't see anywhere to use an IP to listen for something from Pound. I know I asked above, but would this eliminate using multiple IPs and no more Pound reverse proxy?
This is how I currently do it for Pound:
Code:
Service
HeadRequire "Host:.*mydomain1.com*"
BackEnd
Address 192.168.1.100
Port 8000
End
End
Service
HeadRequire "Host:.*mydomain2.net*"
BackEnd
Address 192.168.1.101
Port 8000
End
End
Code:
<VirtualHost 192.168.1.100:8000>