BUG File uploads (including images) not properly rendered/redirected when using custom subdirectory

Viewed 45

Hi

I've compiled apache manually to allow for the custom subdirectory

After struggling with the config I fiinally the custom subdirectory work properly (API+baseurl+reverse proxy)

However, there is an issue remaining with the fact that when I upload any file the URL is returned as ![freedom-jump-image.jpg](https://linsublim.local/community/uploads/post/5oL2sCfYUqy.jpg) but that won't work as it returns a 404 error.

What does work is /uploads/post/5oL2sCfYUqy.jpg but due to the fact that I'm using a subdirectory setup I need to fiddle with the reverse proxy and /uploads/ is farily common in many apps... so I'd rather keep things consistent:) Any chance this is a bug or another option exists to fix this?

Expected result

I'd expect for the app to correctly render the /community link in my config.

Config

Config file

debug: false
server:
  http:
    addr: 0.0.0.0:8100
data:
  database:
    driver: sqlite3
    connection: ./data/answer.db
  cache:
    file_path: cache/cache.db
i18n:
  bundle_dir: i18n
service_config:
  upload_path: uploads
swaggerui:
  show: true
  protocol: http
  host: 127.0.0.1
  address: :80
ui:
  public_url: '/community/'
  api_url: '/community/'
  base_url: "/community"

Thanks!

1 Answers

Powered by Answer - the open-source software that powers Q&A communities.
Made with love © 2025 Apache Answer Meta.