getting plain cgi scripts working with nginx setup
This commit is contained in:
17
web/Makefile
17
web/Makefile
@@ -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
|
||||
|
Reference in New Issue
Block a user