Create required dirs:
mkdir ~/.pow # where play will register the http.port
mkdir ~/.nginx-sites # where pow will create proxy configs
Tell nginx to load sites config from your ~/.nginx-sites
by adding this to /etc/nginx.conf
:
http {
...
include /home/<user>/.nginx-sites/*;
}
Install dnsmasq and add this to /etc/dnsmask.conf
:
address=/dev/127.0.0.1
Setup is complete. To run the daemon script:
sudo linux-nginx-pow
The script will run forever, watching for ~/.pow/* files and creating nginx proxy configs accordingly in ~/.nginx-sites.
It has to be run as root, so it can refresh nginx config with pkill -HUP nginx
.
:+1 (there may even be some ruby lib to use inotify direct)