diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2025-02-04 11:39:04 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2025-02-04 11:39:04 +0800 |
commit | 88be69997cea29d9b45ae31f501d3ad1094dcec4 (patch) | |
tree | f9d92ce964fa7442a02314e71370a6a7d5b9a71f | |
parent | eafe25e057b051c771b18e58aa3691127bd9707a (diff) |
nginx
-rw-r--r-- | nginx/Makefile | 11 | ||||
-rw-r--r-- | nginx/nginx.service | 21 |
2 files changed, 28 insertions, 4 deletions
diff --git a/nginx/Makefile b/nginx/Makefile index cb995f7..d14e24f 100644 --- a/nginx/Makefile +++ b/nginx/Makefile | |||
@@ -1,21 +1,24 @@ | |||
1 | .ONESHELL: | 1 | .ONESHELL: |
2 | 2 | ||
3 | VERSION=1.27.2 | 3 | VERSION=1.27.3 |
4 | 4 | ||
5 | all: src /home/pham/git/ngx_http_proxy_connect_module | 5 | all: src /home/pham/git/ngx_http_proxy_connect_module |
6 | cd $< | 6 | cd $< |
7 | patch -p1 </home/pham/git/ngx_http_proxy_connect_module/patch/proxy_connect_rewrite_102101.patch | ||
8 | ./configure | ||
7 | nginx -V |& \ | 9 | nginx -V |& \ |
8 | sed -nE 's/^configure arguments: ([^\n]*)$$/\1/p' | \ | 10 | sed -nE 's/^configure arguments: ([^\n]*)$$/\1/p' | \ |
9 | sed -nE 's/([^'"'"' \t\n]+('"'"'([^'"'"'\]|\\'"'"'?)*'"'"'|"([^"\\]|\\"?)*")?) ?/\1\n/gp' | \ | 11 | sed -nE 's/([^'"'"' \t\n]+('"'"'([^'"'"'\]|\\'"'"'?)*'"'"'|"([^"\\]|\\"?)*")?) ?/\1\n/gp' | \ |
10 | xargs ./configure \ | 12 | xargs ./configure \ |
11 | --with-http_xslt_module=dynamic \ | 13 | --add-module=/home/pham/git/ngx_http_proxy_connect_module |
12 | --with-http_dav_module \ | 14 | --with-http_dav_module \ |
13 | --with-http_image_filter_module \ | 15 | --with-http_image_filter_module \ |
14 | --add-dynamic-module=/home/pham/git/ngx_http_proxy_connect_module | 16 | # --with-http_xslt_module=dynamic \ |
15 | make modules | 17 | make modules |
16 | make | 18 | make |
17 | sudo make install | 19 | sudo make install |
18 | #cd ../.. && rm -rf nginx | 20 | cd .. && rm -rf src |
21 | sudo ln -sf `pwd`/nginx.service /usr/lib/systemd/system/nginx.service | ||
19 | 22 | ||
20 | src: | 23 | src: |
21 | curl -O https://nginx.org/download/nginx-${VERSION}.tar.gz | 24 | curl -O https://nginx.org/download/nginx-${VERSION}.tar.gz |
diff --git a/nginx/nginx.service b/nginx/nginx.service new file mode 100644 index 0000000..5a4e914 --- /dev/null +++ b/nginx/nginx.service | |||
@@ -0,0 +1,21 @@ | |||
1 | [Unit] | ||
2 | Description=nginx web server | ||
3 | After=network-online.target remote-fs.target nss-lookup.target | ||
4 | Wants=network-online.target | ||
5 | |||
6 | [Service] | ||
7 | Type=forking | ||
8 | PIDFile=/run/nginx.pid | ||
9 | PrivateDevices=yes | ||
10 | PrivateTmp=true | ||
11 | SyslogLevel=err | ||
12 | |||
13 | ExecStart=/usr/bin/nginx | ||
14 | ExecReload=/usr/bin/nginx -s reload | ||
15 | Restart=on-failure | ||
16 | KillMode=mixed | ||
17 | KillSignal=SIGQUIT | ||
18 | TimeoutStopSec=5 | ||
19 | |||
20 | [Install] | ||
21 | WantedBy=multi-user.target | ||