« Lighttpd, virtual hosts, and wildcard domains | Main | Squid handling http –> https redirects »
Lighttpd, virtual hosts, alternative ports
By Matt | May 29, 2009
In the configuration of our new server, all ports 80 and 443 traffic is handled by Squid as a reverse proxy. 8080 is the “backdoor” that bypasses Squid and hits Lighttpd directly.
But the standard format of a Lighttpd virtual host entry doesn’t recognize alternate ports appended after the tld. Not a big deal, this does the trick:
$HTTP["host"] =~ “(^|\.)getmiro\.(com|net|org)($|:8080$)” {
Translated:
(^|\.) Any hostname
getmiro\ Going to the gemtiro domain
.(com|net|org) with a top level domain of com, net, or org
($|:8080$){ and ending with the tld or :8080 will be processed by the rules that follow.
Topics: Lighttpd, Linux, Sysadmin Tools | 1 Comment »
One Response to “Lighttpd, virtual hosts, alternative ports”
Comments
You must be logged in to post a comment.
May 29th, 2009 at 3:29 pm
[...] running Ubuntu Jaunty. We can bypass Squid by going directly to Lighttpd on port 8080 (with special directions to configure virtual hosts to support that [...]