1212
|
1 #!/bin/zsh
|
|
2
|
|
3 CONF=/tmp/light9_nginx.conf
|
|
4 ROOT=`dirname $0`/..
|
|
5 ROOT=${ROOT:a}
|
|
6
|
1215
|
7 bin/homepageConfig > /tmp/light9_nginx_routes.conf
|
|
8
|
1212
|
9 cat > $CONF <<EOF
|
|
10 worker_processes 1;
|
|
11
|
|
12 daemon off;
|
|
13 error_log /tmp/light9_homepage.err;
|
|
14 pid /dev/null;
|
|
15
|
|
16 events {
|
|
17 worker_connections 1024;
|
|
18 }
|
|
19
|
|
20 http {
|
|
21 include $ROOT/light9/web/mime.types;
|
|
22
|
|
23 server {
|
1215
|
24 listen 8054;
|
|
25 access_log off;
|
1212
|
26
|
1215
|
27 include "/tmp/light9_nginx_routes.conf";
|
1212
|
28
|
|
29 location / {
|
|
30 root $ROOT/light9/web;
|
|
31 }
|
|
32
|
|
33 }
|
|
34 }
|
|
35 EOF
|
|
36
|
|
37 exec nginx -c $CONF
|