summaryrefslogtreecommitdiffhomepage
path: root/nginx/Makefile
blob: 8245ae7cf5db8a484ef45eb8ac02e6f3c2787b23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
.ONESHELL:

ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
VERSION=1.27.3

all: src /home/pham/git/ngx-fancyindex
	cd $<
	./configure \
		--prefix=/etc/nginx \
		--sbin-path=/usr/bin/nginx \
		--conf-path=/etc/nginx/nginx.conf \
		--pid-path=/run/nginx.pid \
		--with-http_ssl_module \
		--with-http_dav_module \
		--with-http_image_filter_module \
		--with-http_xslt_module \
		--add-module=/home/pham/git/ngx-fancyindex
	make modules
	make
	sudo make install
	cd $(ROOT_DIR); rm -rf $<
	sudo ln -sf `pwd`/nginx.service /usr/lib/systemd/system/nginx.service

src:
	curl -O https://nginx.org/download/nginx-${VERSION}.tar.gz
	tar zxvf nginx-${VERSION}.tar.gz && mv nginx-${VERSION} $@

config:
	ln -sf `pwd`/* /etc/nginx

/home/pham/git/ngx_http_proxy_connect_module:
	git clone https://github.com/chobits/ngx_http_proxy_connect_module $@

/home/pham/git/ngx-fancyindex:
	git clone https://github.com/aperezdc/ngx-fancyindex $@