New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use PlantUML behind a reverse proxy #79
Comments
Found myself in a similar ⛵ Used the approach from #80 to make the plantuml-server serve on |
I know this Issue is quite old but I faced the same problem. If there is a solution in the meantime, please let me know. Perhaps we could add an example in the README. Situation as above:
Dirty workaroundnginx.config location /plantuml/ {
proxy_set_header HOST $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
rewrite ^(/plantuml)+/(.*) /plantuml/$2 break; # the messy part
proxy_pass http://plantuml-server:8080/;
} docker-compose.yml version: '3.3'
services:
plantuml-server:
build:
context: https://github.com/plantuml/plantuml-server.git
dockerfile: Dockerfile.jetty
args:
BASE_URL: plantuml
image: plantuml/plantuml-server:local
container_name: plantuml-server
ports:
- 8080:8080 Again. If anyone knows of a clean solution, I would greatly appreciate it. Related: #178 |
I had the same problem for a vanilla container (not building via Dockerfile). The solution can be found here, and just requires you to add the http-forwarded as a command-line argument. Here is my updated docker-config file:
|
The "special" value of `ROOT` will serve requests on `/`. Any other value should serve on `/$BASE_URL` (as long as there are no slashes in `BASE_URL` at least). The default has been set to `plantuml` to better match documentation in the README.md file. Re plantuml#80, may help with plantuml#79.
The "special" value of `ROOT` will serve requests on `/`. Any other value should serve on `/$BASE_URL` (as long as there are no slashes in `BASE_URL` at least). The default has been set to `plantuml` to better match documentation in the README.md file. Re plantuml#80, may help with plantuml#79.
Hi everyone,
i try to use plantUML behind a reverse proxy and have some problems with it.
My plantuml server ist running at:
http://plantuml.pcf.tld/
The request for plantuml goes to:
http://intra.domain.tld/plantuml which reverse proxys requests to
http://plantuml.pcf.tld/
Direct Requests to png/svg are working, for example:
http://intra.domain.tld/plantuml/png/SyfFKj2rKt3CoKnELR1Io4ZDoSa70000 -> works fine
What is not working are links in the jsp singlepage application.
Whent i try to access: http://intra.domain.tld/plantuml/
it redirects to http://intra.domain.tld/uml/SyfFKj2rKt3CoKnELR1Io4ZDoSa70000 -> which is the wrong context root ("uml" instead of "plantuml").
When i try to access the singlepage application with a direkt request like:
http://intra.domain.tld/plantuml/uml/SyfFKj2rKt3CoKnELR1Io4ZDoSa70000
the page loads, but all links in build against the wrong URL ( it builds the links against http://plantuml.pcf.tld instead of http://intra.domain.tld/plantuml )
I would really like to use the jsp singlepage with the reverse Proxy. I have not found a way to fix this.
The index.jsp gets the host URI from:
<c:set var="hostpath" value="${scheme}://${pageContext.request.serverName}${port}${contextroot}" />
As the server where plantuml is running is not the same that delivers the webpages, this does not work for my scenario.
Can you make the baseurl where plantuml is building on configurable or have any advice for me?
The text was updated successfully, but these errors were encountered: