Skip to content
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

Nginx can not serve it on subdirectory well since jetty-v1.2023.5 (Solved) (Need document) #277

Open
zero00072 opened this issue Apr 21, 2023 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@zero00072
Copy link

zero00072 commented Apr 21, 2023

Describe the bug

I have installed PlantUML container version jetty-v1.2023.1 and version jetty-v1.2023.5 behind Nginx reverse proxy. PlantUML ver jetty-v1.2023.5 can not inject my Host base url (with subdirectory) to HTML urls. So that the HTML page expect the base url reffer to a real root, and omit them. Then, all web resources and urls missed.

To Reproduce

Steps to reproduce the behavior:

  1. Setting Nginx reverse proxy.
location /plantuml/ {
  rewrite /plantuml(.+) $1 break;

  proxy_set_header Host $http_host/plantuml;

  proxy_pass http://plantuml:8080;
  proxy_cache off;
}
  1. docker-compose up -d plantuml
  2. Visit the web which Nginx served. With url: https://<domain_name>/plantuml/.

Expected behavior

Work well like PlantUML container version jetty-v1.2023.1.

Screenshots

jetty-v1.2023.1 jetty-v1.2023.5
jetty-v1.2023.1 jetty-v1.2023.5

Desktop:

  • OS
    • Debian GNU/Linux |
  • Browser
    • Mozilla Firefox
  • Version
    • 112.0.1
@zero00072 zero00072 changed the title Nginx can not serve it on subdirectory well since jetty-v1.2023.5 Nginx can not serve it on subdirectory well since jetty-v1.2023.5 (Solved) (Need document) Apr 24, 2023
@zero00072
Copy link
Author

There are no more information at dockerhub to describe the usage.

Just remove all:

location /plantuml/ {
  proxy_pass http://plantuml:8080;
  proxy_cache off;
}

And add variable:

---
version: '3'
services:
  plantuml:
    image: plantuml/plantuml-server:jetty
    restart: always
    environment:
      BASE_URL: plantuml
      PLANTUML_LIMIT_SIZE: 8192
...

@HeinrichAD
Copy link
Collaborator

I agree that the documentation on DockerHub is quite short. There could at least be a section which indicates that there is more information/documentation, as well as examples, on the GitHub repository. But this can only be done by somebody with access to the DockerHub account.

If I have understood the described situation correctly, then the example "Nginx reverse proxy example with defined location directive (different context path)", should cover exactly your case. Perhaps the example will also answer some still remaining questions.

@HeinrichAD HeinrichAD added the documentation Improvements or additions to documentation label Jul 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants