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