location /janus/ {
proxy_pass http://127.0.0.1:8088/janus/;}location /janusbase/ {
proxy_pass http://127.0.0.1:8088/;}and I use var server = "/janusbase/janus";
Michaels-MacBook-Air:~ mike$ curl-H "Content-Type: application/json" -d '{"janus":"create","transaction":"A3x4TXLyZ3Ev"}' http://192.168.0.224/janusbase/janus
{
"janus": "success",
"transaction": "A3x4TXLyZ3Ev",
"data": {
"id": 1904517468
}
}
Michaels-MacBook-Air:~ mike$
What would var server be in your setup with location /janus/ and proxy_pass http://127.0.0.1:8088/janus/; If it were var server = "/janus"; I don't think it works because you are trying to have nginx match on what it thinks is a page target name not a directory stem. See http://nginx.com/resources/admin-guide/reverse-proxy/
The problem, or part of it, seems to be described in http://nginx.org/en/docs/http/ngx_http_core_module.html#location, as follows:
If a location is defined by a prefix string that ends with the slash character, and requests are processed by one of proxy_pass, fastcgi_pass, uwsgi_pass, scgi_pass, or memcached_pass, then the special processing is performed. In response to a request with URI equal to this string, but without the trailing slash, a permanent redirect with the code 301 will be returned to the requested URI with the slash appended. If this is not desired, an exact match of the URI and location could be defined like this:
location /user/ {
proxy_pass http://user.example.com;
}
location = /user {
proxy_pass http://login.example.com;
}It seems the difference between ProxyPass /path and ProxyPass /path/ in http://httpd.apache.org/docs/2.2/mod/mod_proxy.html is not well described or defined and neither is the difference between proxy_pass /path/ and proxy_pass /path in http://nginx.org/en/docs/http/ngx_http_proxy_module.html?&_ga=1.43766309.1651162240.1426448296#proxy_pass
Does anyone else have an nginx setup with proxy_pass and var server they can share, please?