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

When using a apache reverse proxy with a subdirectory, it does not display correctly. #3902

Closed
paimonian opened this issue Dec 25, 2024 · 4 comments
Labels
Bug Issues that contain unintended behavior

Comments

@paimonian
Copy link

config.yml

Webserver:
  Port: 8804
  Alternative_IP:
    Enabled: true
    Address: address.com/plan/

Apache config (SSL):

RewriteEngine on
RewriteRule ^(.*/[^./]+)$ $1/ [R=301,L]
<IfModule mod_proxy.c>
  ProxyRequests Off
  ProxyPass /plan http://localhost:8804
  ProxyPassReverse /plan http://localhost:8804
</IfModule>

Logos, etc. will not be displayed correctly, but other data will be displayed.
2024-12-25 (1)

Plugin versions

5.6 build 2883

@paimonian paimonian added the Bug Issues that contain unintended behavior label Dec 25, 2024
@AuroraLS3 AuroraLS3 added note: Misconfiguration and removed Bug Issues that contain unintended behavior labels Dec 25, 2024
@AuroraLS3
Copy link
Collaborator

You can enable webserver request logs to console in Plan config under webserver settings to see where Apache is sending the requests to.

If there is no requests for the images visible in that log there is likely another rule being used for those.

@paimonian
Copy link
Author

@Virenbar
Copy link

Virenbar commented Jan 1, 2025

I have the same problem but on nginx and I also use subdirectory.
The page always requests the logo from the root despite the subdirectory in the config.
image
Shouldn't this src also include the baseAddress?

<a className="sidebar-brand d-flex align-items-center justify-content-center" href="/">
<img alt="logo" className="w-22" src={logo}/>
</a>

@AuroraLS3
Copy link
Collaborator

I have the same problem but on nginx and I also use subdirectory. The page always requests the logo from the root despite the subdirectory in the config. image Shouldn't this src also include the baseAddress?

<a className="sidebar-brand d-flex align-items-center justify-content-center" href="/">
<img alt="logo" className="w-22" src={logo}/>
</a>

Relative imports append base address with a different mechanism modifying the resulting bundle https://github.com/plan-player-analytics/Plan/blob/master/Plan/common/src/main/java/com/djrapitops/plan/delivery/rendering/BundleAddressCorrection.java

The match pattern appears to be missing png

@AuroraLS3 AuroraLS3 added Bug Issues that contain unintended behavior and removed note: Misconfiguration labels Jan 1, 2025
@AuroraLS3 AuroraLS3 added this to Backlog Jan 1, 2025
@github-project-automation github-project-automation bot moved this to INBOX in Backlog Jan 1, 2025
@github-project-automation github-project-automation bot moved this from INBOX to Done in Backlog Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues that contain unintended behavior
Projects
Status: Done
Development

No branches or pull requests

3 participants