Hi Katy,

The problem may be that the demo site backend (api7.dspace.org) is 
configured to *only trust* requests that come from http://localhost:4000 or 
https://demo7.dspace.org (the demo frontend).  So, if you try to run a 
frontend that uses a different URL, then it will be an untrusted URL and 
may result in a 500 (or other similar errors).  

Simply put, as soon as you want to run the frontend via a different URL, 
you will need to use your own backend.  The demo backend is only for basic 
demo / development purposes. 

I suspect that may be what you are seeing.

Tim

On Tuesday, July 18, 2023 at 7:34:24 PM UTC-5 katy...@gmail.com wrote:

> Hello, 
>
> I'm working on similar server 500 errors, and I decided to take a break on 
> working my certs and have my front end connect to 
> https://api7.dspace.org/server instead, as its certs are working.... To 
> do so, my config.prod.yml looks like this now.
>
> ui:
>   ssl: false
>   host: localhost
>   port: 4000
>   nameSpace: /
>   rateLimiter:
>     windowMs: 60000 # 1 minute
>     max: 500 # limit each IP to 500 requests per windowMs
>   # Trust X-FORWARDED-* headers from proxies (default = true)
>   useProxies: true
>
>
> rest:
>   ssl: true
>   host: api7.dspace.org
>   port: 443
>   nameSpace: /server
>
> When I connect to http://localhost:4000/home, I get see api7.dspace.org 
> stuff through my front end and I can navigate it just fine (other than the 
> Log in stuff, of course).
>
> However, *as soon as I turn on my virtual host (apache httpd), my front 
> end connects to api7.dspace.org <http://api7.dspace.org> for about 3 
> seconds, and then it throws a 500*. I'm not really sure where to go from 
> here.... Do I need to change config.prod.yml again?
>
> Here is what I have for my virtual host:
>
> <VirtualHost *:80>
> ServerName mydomain.com
>
> ProxyPass / http://localhost:4000/
>         ProxyPassReverse / http://localhost:4000/
> Header set Access-Control-Allow-Origin "*"
> </VirtualHost>
>
> What else should I be changing? Restarting pm2 doesn't seem to help... 
> Maybe there is some other Apache setting? ServerRoot? <DocumentRoot>? 
> <Directory>?
>
> Many thanks,
>
> Katy
>
>
> On Wednesday, 5 July 2023 at 12:20:24 UTC-7 DSpace Technical Support wrote:
>
>> Hi Kyky,
>>
>> I suspect the issue may be that the backend is NOT running SSL/HTTPS.  
>> The REST API *MUST* run HTTPS if you are using non-"localhost" URLs.  It's 
>> also not possible to run the UI on HTTPS while keeping the REST API on HTTP.
>>
>> See also this common installation issue which is cause of many 500 
>> exceptions. 
>> https://wiki.lyrasis.org/display/DSDOC7x/Installing+DSpace#InstallingDSpace-%22No_linkssectionfoundat...%22errorfromUserInterface
>>
>> Tim
>>
>> On Monday, July 3, 2023 at 6:24:08 AM UTC-5 kykys...@gmail.com wrote:
>>
>>> Hello everyone, i've got problem with my UI config after add SSL.
>>>
>>> this is my configuration:
>>> local.cfg
>>>
>>> dspace.server.url = http://51.79.225.29:4420/server/
>>> dspace.ui.url = https://dspace.logiaedu.com
>>>
>>> config.prod.yml
>>> ui: 
>>>     ssl: false
>>>     host: 51.79.225.29
>>>     port: 4000
>>>
>>> rest:
>>>     ssl: false
>>>     host: 51.79.225.29
>>>     port: 4420
>>>     nameSpace: /server
>>>
>>> before applying the ssl and configure the backend config it works 
>>> perfectly, but after applying ssl and change the backend config, it's 
>>> always redirect to /500 Service Unavailable. i've read some issues like 
>>> this and tried to fix it like the reference but it's still failed
>>>
>>>
>>> Thanks
>>>
>>> Kyky
>>>
>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/96814fd1-4128-420b-9619-0e2c302f6157n%40googlegroups.com.

Reply via email to