Dspace 7.6 behind Apache Reverse Proxy

60 views
Skip to first unread message

Rupinder Singh

unread,
Apr 23, 2024, 2:42:30 PMApr 23
to DSpace Technical Support
Hi, 
I have been having this feeling that DSpace has been made unnecessarily complicated by moving to this new angular UI. It is a pain to set up, and then it's difficult to troubleshoot.  
What I also don't understand Is why most of the documentation and most of the support emails answer the questions thinking that everyone is running DSpace locally. I mean, all of the demos, all of the instructions, mention "localhost" or "127.0.0.1" everywhere. 
Anyway.
I want to publish my repository over the web from an Apache server, but i cant find a single post/wiki/article/support mail that can help in running the DSpace angular UI behind the Apache Reverse proxy.  So here is the problem, 

My server IP is 10.2.3.109 (This is translated to my Real IP in the firewall and then to a domain)
the backend is running on 10.2.3.109:8080
the frontend is running on 10.2.3.109:4000
Everything works well, but I can't publish the repository on the web over port 4000, so i decided to engage Apache Reverse proxy. With every needed mod enabled and setting done, as follows
 <VirtualHost *:80>
        ServerName 10.2.3.109
        #DSpace backend
        ProxyPass /server http://10.2.3.109:8080/server
        ProxyPassReverse /server http://10.2.3.109:8080/server

        # angular UI
        ProxyPass / http://10.2.3.109:4000/
        ProxyPassReverse / http://10.2.3.109:4000/
 </VirtualHost>

With this, I can see my backend OAI page passed through Apache proxy with the URL http://10.2.3.109/server. But whenever I open http://10.2.3.109 for the angular UI, it flashes the Home page for a second and then gives Error 500. I can't figure out why this is happening; I also have "rest.cors.allowed-origins = ${dspace.ui.url}" in my local.cfg file. But that, too, is no help. 
I have a running repository on Dspace 6.2, and I am doing this entire exercise to upgrade and migrate to Dspace 7. But after bumping into all this trouble, I am literally thinking of ditching Dspace and learning something new like Invenio Framework, Fedora Commons, or maybe Greenstone. 
Can anyone help, please?

Thank You
Rupinder Singh


DSpace Technical Support

unread,
Apr 23, 2024, 5:46:01 PMApr 23
to DSpace Technical Support
Hi Rupinder,

We have instructions/examples for an Apache Reverse Proxy in our Installation Guide for DSpace 7. 
The examples ProxyPass / ProxyPassReverse settings in those areas of the docs *do use* localhost, as sites may choose to run their Apache (Proxy) and Tomcat / PM2 on the same machine (in which case localhost URLs is the best way to go).  However, you obviously can replace the "localhost" with an IP address if Tomcat / PM2 are running on a different server.  Those settings are just meant to be examples, as different institutions may choose different approaches.

As for the 500 error, we have a guide for common installation issues at the bottom of the install instructions: https://wiki.lyrasis.org/display/DSDOC7x/Installing+DSpace#InstallingDSpace-FrontendInstallation    In most cases that 500 error is a sign that this "No _links section found at..." error is occurring: https://wiki.lyrasis.org/display/DSDOC7x/Installing+DSpace#InstallingDSpace-%22No_linkssectionfoundat...%22errorfromUserInterface   There are a number of suggestions of possible causes (and solutions) in that section.

If you haven't found it already, our Troubleshooting guide provides ways to find these detailed error messages in the UI or REST API: https://wiki.lyrasis.org/display/DSPACE/Troubleshoot+an+error#Troubleshootanerror-DSpace7.x(orabove)   Finding the detailed error makes it easier to determine if it is one of the ones that is documented in the "Common Installation Issues" or perhaps if it's something answered on this tech support list.

Tim
Reply all
Reply to author
Forward
0 new messages