Reverse proxying with a URL path different than /
- Dominant language
- Go
- Stars
- 2.1k
- Forks
- 274
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 106
Description
Different OCIS services have configuration parameters that seem to provide the option to allow serving to a public URL such as `https://domain/data/`, so that a proxy could receive this requests and redirect them to OCIS. Nevertheless, I could not find in the documentation what is the proper setup and none of my multiple attempts worked.
For instance, I have an nginx configured with:
```
location /{
#rewrite /data/(.*) /$1 break;
proxy_pass http://localhost:9200;
proxy_redirect off;
proxy_set_header Host $host;
}
```
And I tried running OCIS server with multiple combination of parameters, such as:
```
WEB_HTTP_ROOT=/data/ PROXY_TLS=false PROXY_HTTP_ADDR=0.0.0.0:9200 OCIS_URL=https://domain/ ./bin/ocis server
PROXY_HTTP_ROOT=/data/ PROXY_TLS=false PROXY_HTTP_ADDR=0.0.0.0:9200 OCIS_URL=https://domain/ ./bin/ocis server
```
But none has worked (I tried OCIS 2.0.0). I can get some responses if I remove these *_ROOT environment variables and I make nginx remove the `/data/` section from the URL, but then the response that I get back contains links to css or javascript (and others) without that `/data/`, thus returning 404 to the browser.
If this functionality is available, it would be convenient to provide an example in the documentation. Otherwise, it would be nice to have this feature implemented so that we are not forced to create subdomains for each self-hosted OCIS.
Contributor guide
Research direction
Start with the nginx location/proxy_pass configuration and the OCIS server invocation shown in the issue, then verify how WEB_HTTP_ROOT, PROXY_HTTP_ROOT, and OCIS_URL are interpreted. Reproduce the /data/ deployment and document a working setup if supported; otherwise record the missing behavior and expected asset URLs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, nginx
- Domain
- devops, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100