Dspace 8.1 Bitstream Link Issue

95 views
Skip to first unread message

Bryson Duda

unread,
Mar 22, 2025, 11:49:09 AM3/22/25
to DSpace Technical Support
Hi everyone,

I recently upgraded a Dspace repository from version 6.3 to version 8.1. The service is up and running now, but I'm running into an issue with bitstream URLs. I work for a university library, and our workflow with Dspace 6.3 was to add an item to Dspace, get a bitstream link directly to the file, and then add that link to our library catalogue. After upgrading to 8.1, I can access files if I navigate to them in Dspace, but the old bitstream URLs don't work. 

For example, here's an item in our repository. Downloading the PDF from that page works fine, but using this Dspace 6 URL redirects to localhost:4000.

Strangely if I remove the two query parameters in the URL like this, it then redirects me to https://www.ulethbridge.ca/bitstreams/6e17c8af-c6b5-4657-8f79-eb96822d9950/download (which is missing the /lib/ematerials portion of the URL).

I thought at first that the issues above (especially the localhost:4000 one) were due to an httpd configuration issue, but it still seems to happen even if I comment out the ProxyPass and ProxyPassReverse lines in httpd.conf.

Our setup is a bit unusual. The root/base URL for this repository is https://www.ulethbridge.ca/lib/ematerials 
Our university's central IT department manages the ulethbridge.ca domain, but requests to /lib/ematerials get sent to our Dspace server. For what it's worth, this setup has proven to be quite a pain when trying to configure things and I would not recommend it. I suspect that using a subdomain would have saved me a great deal of stress!

I can replace the catalogue links with new URLs if needed, but if anyone has any suggestions for how to make the old ones work, it would be greatly appreciated!

Software Versions:
OS: Windows Server 2016
Dspace: 8.1
Tomcat: 10.1.39
HTTPD: 2.4.54
Node.js: 22.14.0
OpenJDK: 24
(I'm currently running the Dspace front end using "node main.js", but I'll switch to PM2 once I have the bugs worked out)

httpd.conf snippet:
<VirtualHost *:443>
    ServerName www.ulethbridge.ca
     
    ProxyPreserveHost On
    RequestHeader set X-Forwarded-Proto https
...
    ProxyPass /lib/ematerials http://localhost:4000/lib/ematerials
    ProxyPassReverse /lib/ematerials http://localhost:4000/lib/ematerials
</VirtualHost>

server.xml snippet:
<Host name="localhost" appBase="C:/dspace/webapps" autoDeploy="true" unpackWARs="true">
<Alias>www.ulethbridge.ca</Alias>
<Context docBase="/server" path="/lib/ematerials/server" reloadable="true"/>
</Host>

local.cfg snippet:

config.yml snippet:
ui:
  ssl: false
  host: localhost
  port: 4000
  nameSpace: /lib/ematerials
rest:
  ssl: true
  host: www.ulethbridge.ca
  port: 443
  nameSpace: /lib/ematerials/server


If there's any other relevant information that I'm missing, please let me know! 
Thanks,
Bryson

Andrew K

unread,
Mar 22, 2025, 7:06:29 PM3/22/25
to Bryson Duda, DSpace Technical Support
Hi Bryson,

I am not completely sure but I'd rather set it this way (btw, you forgot to mention proxy settings for the server):

    ProxyPass /lib/ematerials http://localhost:4000/
    ProxyPassReverse /lib/ematerials http://localhost:4000/

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

And played with other parameters to get it working.

WBR,
Andrew

сб, 22 бер. 2025 р. о 17:49 Bryson Duda <bryso...@gmail.com> пише:
--
All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dspace-tech/a3ec23ed-7115-44f4-9240-c37ea11aa9e9n%40googlegroups.com.


--
Best regards,
Andrew

Kalyan kumar

unread,
Mar 22, 2025, 7:35:16 PM3/22/25
to Bryson Duda, DSpace Technical Support
Hi Bryson,

Having a domain or sub-domain dedicatedly for dspace is a better option than having a sub directory in a common domain. Configuring DNS records and SSL also becomes easy. 
You may please check the url using the server's local ip/localhost  from the server (without using the public domain) to ensure that the problem is not due to domain related issues.

Kalyan
Greenbooks Imaging Services LLP



--

Bryson Duda

unread,
Mar 23, 2025, 9:03:03 AM3/23/25
to DSpace Technical Support
Hi Andrew,

Thanks for your suggestion! I did give those configurations a try, but I get a 404 error back (Cannot GET /). 
Which other proxy settings would be helpful? The only other ones in httpd.conf that relate to proxies that I can see (apart from all of the LoadModule lines) are:
<IfModule headers_module>
    RequestHeader unset Proxy early
</IfModule>
and
<IfModule proxy_html_module>
Include conf/extra/proxy-html.conf
</IfModule>

There's also these lines from server.xml if they're helpful:
   <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" secretRequired="false" address="::1"/>
   <Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443"
               maxParameterCount="1000" />

All the best,
Bryson

Bryson Duda

unread,
Mar 23, 2025, 9:11:56 AM3/23/25
to DSpace Technical Support
Hi Kalyan,

Agreed! Using a subdomain wasn't an option when I first set it up, but it might be worth revisiting again as the current setup has been a constant source of complications. 

Quick addendum: It looks like the localhost:4000 issue that I mentioned above might have been a caching issue, so apologies for any confusion there. It's really just the bitstream redirect removing the /lib/ematerials part of the URL that's an issue.

Andrew K

unread,
Mar 23, 2025, 3:57:23 PM3/23/25
to Bryson Duda, DSpace Technical Support
Hi Bryson,

I mean that along with site.conf you should also make changes in other configs.
Have you tried removing these in bold? All at once, or in different combinations?

server.xml snippet:
<Host name="localhost" appBase="C:/dspace/webapps" autoDeploy="true" unpackWARs="true">
<Alias>www.ulethbridge.ca</Alias>
<Context docBase="/server" path="/lib/ematerials/server" reloadable="true"/>
</Host>

config.yml snippet:
ui:
  ssl: false
  host: localhost
  port: 4000
  nameSpace: /lib/ematerials
rest:
  ssl: true
  host: www.ulethbridge.ca
  port: 443
  nameSpace: /lib/ematerials/server



нд, 23 бер. 2025 р. о 15:03 Bryson Duda <bryso...@gmail.com> пише:
--
All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.


--
Best regards,
Andrew

Bryson Duda

unread,
Apr 23, 2025, 5:36:31 PM4/23/25
to DSpace Technical Support
Just wanted to follow up and say that I wasn't able to get this working with my initial setup, but I reconfigured everything to a more standard subdomain approach and that took care of the problem. If nothing else, maybe this can serve as a cautionary tale to others. 

Thanks for your suggestions, everyone!
Bryson

Reply all
Reply to author
Forward
0 new messages