http://example.com/growthforecast/
でgrowthforecastを動かしたい!
growthforecastを--front-proxy
を指定して起動。
growthforecast.pl \
--data-dir /opt/racelive/growthforecast/ \
--host 127.0.0.1 \
--front-proxy 192.168.0.1 # proxyのWAN側IPアドレス
nginxのserverディレクティブでproxy_passの設定をする。
exmaple.com.conf
location /growthforecast {
proxy_pass http://127.0.0.1:5125;
proxy_set_header Host $host/growthforecast;
rewrite ^/growthforecast/(.*) /$1 break;
}
スラッシュが2個ついてしまうので調査中…。