parent
de6a85b421
commit
5f9583bfae
@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
ROOT ?= $(PWD)
|
||||||
|
HTTP_PORT ?= 49448
|
||||||
|
PHP_FCGI_PORT ?= 49449
|
||||||
|
|
||||||
|
|
||||||
|
serve: nginx.conf
|
||||||
|
nginx -p $(ROOT)/ -c $(ROOT)/$<
|
||||||
|
|
||||||
|
|
||||||
|
serve-php:
|
||||||
|
php-cgi -b 127.0.0.1:$(PHP_FCGI_PORT)
|
||||||
|
|
||||||
|
|
||||||
|
nginx.conf: nginx.conf.in
|
||||||
|
cat $< | \
|
||||||
|
sed -e 's@__ROOT__@$(ROOT)@g' \
|
||||||
|
-e 's@__HTTP_PORT__@$(HTTP_PORT)@g' \
|
||||||
|
-e 's@__PHP_FCGI_PORT__@$(PHP_FCGI_PORT)@g' > $@
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: serve
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
HERE="$(dirname $(readlink -f $0))"
|
|
||||||
exec nginx -p $HERE/ -c $HERE/nginx.conf
|
|
@ -1,2 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
exec php-cgi -b 127.0.0.1:49449
|
|
Loading…
Reference in new issue