getting plain cgi scripts working with nginx setup

This commit is contained in:
Dan Buch
2011-01-03 17:18:06 -05:00
parent 50c240b0e1
commit 080b7ba992
7 changed files with 230 additions and 9 deletions

View File

@@ -1,16 +1,29 @@
ROOT ?= $(PWD)
HTTP_PORT ?= 49228
NGINX_CONF_IN := nginx.conf.in
ALL_NGINX_CONF_INPUTS := \
$(NGINX_CONF_IN) \
$(wildcard perl_requirements.d/*) \
$(wildcard perl_locations.d/*)
serve: nginx.conf
nginx -p $(ROOT)/ -c $(ROOT)/$<
nginx.conf: nginx.conf.in
nginx.conf: $(ALL_NGINX_CONF_INPUTS)
cat $< | \
sed -e 's@__ROOT__@$(ROOT)@g' \
-e 's@__HTTP_PORT__@$(HTTP_PORT)@g' > $@
.PHONY: serve
serve-cgiwrap: cgiwrap-fcgi.pl
perl $<
cgiwrap-fcgi.pl: cgiwrap-fcgi.pl.in
cat $< | sed -e 's@__ROOT__@$(ROOT)@g' > $@
.PHONY: serve serve-cgiwrap