Old Bitstream URIs redirecting to localhost:4000

22 views
Skip to first unread message

donna....@canterbury.ac.nz

unread,
Dec 9, 2025, 6:52:28 PM (6 days ago) Dec 9
to DSpace Technical Support

We’re on DSpace 9.1, but this may have been an issue for us on 7.6 that we weren’t aware of. 

If we try to access a PDF via the old link, e.g. https://ir.canterbury.ac.nz/bitstream/handle/10092/1534/thesis_fulltext.pdf it redirects to https://localhost:4000/bitstreams/d8d938d9-002d-4692-ae28-50d41e65a84b/download.

I’ve seen a few similar issues discussed here in the past, but none of the suggested solutions have helped us - we're not seeing localhost in our meta tags or sitemaps, as per some others.

Our DSpace UI and backend are running on the same server, with Tomcat behind an Apache HTTPD reverse proxy. SSL is handled by our institution’s firewall, so our UI is still configured for localhost.

Some snippets from config.yml

ui:
ssl: false
host: localhost
port: 4000
nameSpace: /
rateLimiter:
windowMs: 60000 
max: 500 
useProxies: true

rest:
ssl: true
host: irtest3.canterbury.ac.nz
port: 443
nameSpace: /server
ssrBaseUrl: http://localhost:8080/server

And a snippet from <VirtualHost *:80> in httpd config:

ServerName ir.canterbury.ac.nz
ProxyPreserveHost On
RequestHeader set X-Forwarded-Proto https
RequestHeader set X-Forwarded-Host irtest3.canterbury.ac.nz

ProxyPass / http://localhost:4000/
ProxyPassReverse / http://localhost:4000/

ProxyPass /server http://localhost:8080/server
ProxyPassReverse /server http://localhost:8080/server

Has anyone had something similar and knows where we could be going wrong?

Thanks,
Donna

Andrew K

unread,
Dec 11, 2025, 9:19:26 AM (4 days ago) Dec 11
to DSpace Technical Support

ssrBaseUrl: http://localhost:8080/server


When I read your message, I decided to look into my config (full production setup with ssl and reverse proxy).
And I noticed that ssrBaseUrl was commented out. I though: oh, my bad, I could make my server even faster!
So I enabled it, the same default value as yours, and restarted UI.
I could not test any old URL but I noticed that it broke user login to DSpace. So I commented it out again.
Worth trying in your case, anyways.

WBR,
Andrew

Reply all
Reply to author
Forward
0 new messages