Serves sockets in a folder as subdomains of
Say you have a folder,
/var/sockets, and serve some webapps on sockets in that
/var/sockets - myapp.sock - otherthing.sock
you can then
$ curl myapp.dev ... $ curl otherthing.dev ...
It will run on port 8080 by default, forwarding requests to
xxx.sock in the directory specified by
--socket-dir. The only
thing left to do is to setup forwarding port 80 to port 8080.
On Ubuntu, at least, this is not too hard.
$ sudo apt-get install dnsmasq resolvconf
address=/dev/127.0.0.1 interface=lo no-dhcp-interface=lo
$ sudo iptables -t nat -I OUTPUT -p tcp -d 127.0.0.1 --dport 80 -j REDIRECT --to-ports 8080
It should work!