因為 wisemapping 預設使用 8080 port
etherpad 預設使用 9001 port
都很麻煩~~所以就使用 nginx proxy 幫忙轉址了
以下是測試很久的設定檔
location /pad {
rewrite ^/pad(/.*)$ $1 break;
proxy_pass http://localhost:9001/;
proxy_set_header Host $host;
proxy_buffering off;
access_log /var/log/nginx/etherpad.log;
error_log /var/log/nginx/etherpad.log;
}
location /map {
#rewrite ^/map(/.*)$ $1 break;
proxy_pass http://localhost:8080/map;
proxy_set_header Host $host;
proxy_buffering off;
access_log /var/log/nginx/wisemapping.log;
error_log /var/log/nginx/wisemapping.log;
}
配合這個設定
etherpad 需要設定 {etherpad home directory}/settings.json
//略
//IP and port which etherpad should bind at
"ip": "127.0.0.1",
"port" : 9001,
/*when you use NginX or another proxy/ load-balancer set this to true*/
"trustProxy": true,
//略
wisemapping 要設定的地方比較多….
{wisemapping home directory}/webapps/wisemapping/WEB-INF/app.properties
<略>
site.baseurl = http://{伺服器IP}/map
<略>
documentation.services.basePath=http://{伺服器IP}/map/service
<略>
{wisemapping home directory}/contexts/wisemapping.xml
<略>
<略>
/map
<略>