将Udash演示应用程序部署到NGINX

时间:2016-12-18 20:42:55

标签: nginx sbt udash

如何在SBT之外部署Udash框架演示,并在NGINX下运行?

1 个答案:

答案 0 :(得分:0)

我知道这很蹩脚,但是我可以用NGINX在这行下运行:

nohup sbt -Djline.terminal = jline.UnsupportedTerminal run&

和这些位置映射:

location /notifications/ {
    proxy_pass       http://127.0.0.1:12345;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
}

location /atm/ {
    proxy_pass       http://127.0.0.1:8080;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
}

location /frontend/ {
    proxy_pass       http://127.0.0.1:12345;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
}

location / {
    proxy_pass       http://0.0.0.0:8080;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
}