Hi Karol,

If DSpace is redirecting to localhost, but everything else is working fine, 
then it's possible you need to set the X-Forwarded-Host and/or 
X-Forwarded-Proto headers in your Apache or Nginx proxy.  It sounds like 
the DSpace backend isn't getting the information it needs through your 
proxy.  This issue is essentially similar to the one listed in our "Common 
Installation Issues" about how the robots.txt has incorrect sitemap URLs: 
https://wiki.lyrasis.org/display/DSDOC8x/Installing+DSpace#InstallingDSpace-MyUserInterface'srobots.txthasincorrectsitemapURLs
  
 So, if you follow the instructions there, I suspect it may also fix your 
issue.

Tim
On Wednesday, May 21, 2025 at 12:32:54 AM UTC-5 [email protected] wrote:

> Hi,
> I'm using DSpace version 7.6.3 and I'm having an issue where the frontend 
> redirects old-style bitstream links (e.g., /bitstream/...) to 
> https://localhost:4000/.... Did you  solve this problem?
> Best,
>
> Karol
>
> sobota, 10 sierpnia 2024 o 17:38:06 UTC+2 sanjib modak napisał(a):
>
>> Description:
>> We are experiencing an issue in Dspace version 8 with direct PDF links  
>> that was indexed in different search engines when we used the DSpace 
>> version 6. When a user clicks on a direct PDF link provided by a search 
>> engine (e.g., Google), they are redirected to a localhost:4000 URL instead 
>> of the domain name.
>> we are using Nginx as reverse proxy server and the configuration 
>> suggested by the documentation.
>> Expected Behavior:
>> The direct PDF link should allow users to access the file and redirect 
>> them to the actual domain rather than the localhost.
>> Actual Behavior:
>> For example this direct pdf link which was indexed by the google 
>> https://ir.nbu.ac.in/bitstream/123456789/5323/1/A%20Comprehensive%20Illustration%20of%20Water%20Pollution%20Being%20a%20Pitfall%20of%20Human%20Activities_03.pdf
>>  
>>  This direct PDF link redirects users to 
>> https://localhost:4000/bitstreams/e6cc908a-9754-4f7b-adcd-b112e91f9c5e/download,
>>  
>> which is not accessible externally.
>> Configuration:
>>
>>    - DSpace version: 8
>>    - Nginx as proxy pass
>>    
>> this is the nginx configuration.  
>> # Setup HTTPS access
>> server {
>>   listen 80;
>>   server_name domain.com;
>>  
>>  
>>   location /server {
>>     proxy_set_header X-Forwarded-Proto https;
>>     proxy_set_header X-Forwarded-Host $host;
>>     proxy_pass http://localhost:8080/server;
>>   }
>>  
>>   location / {
>>     proxy_set_header X-Forwarded-Proto https;
>>     proxy_set_header X-Forwarded-Host $host;
>>     proxy_pass http://localhost:4000/;
>>   }
>> }
>> My ssl is being handle by the domain. Will any Nginx configuration 
>> changes will resolve this problem? If anyone has any idea how to resolve 
>> this issue please suggest.
>>
>

-- 
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/dspace-tech/99eccdd5-215a-4eb3-923a-f7330295a517n%40googlegroups.com.

Reply via email to