Hi Karol,

For your frontend config (config.prod.yml), your "ui" settings should be using 
localhost​.  For example:

ui:
  ssl: false
  host: localhost
  port: 4000
  nameSpace: /


This is necessary because the "ui" section tells Node where to start the 
frontend.  In your situation you want it running at http://localhost:4000/ , as 
you have Apache setup to redirect to that location.

Keep in mind, in your backend​ configs (in local.cfg) you should still have the 
UI set as "dspace.ui.url = https://dspace.test.pl"; because that's the public 
URL​ of your frontend.

So, it may seem a bit confusing that the "dspace.ui.url" doesn't match with the 
"ui" settings on the fronted...but that's often​ the case.  In the "ui" 
settings you are defining the local URL where the UI runs....while in 
"dspace.ui.url" you must have the public URL of the UI.  These are usually not 
the same.

Good luck.  I suspect this is the problem you are hitting, but if it doesn't 
fix things, let us know on this list!
Tim
________________________________
From: [email protected] <[email protected]> on behalf of 
Karol Sokalski <[email protected]>
Sent: Wednesday, June 22, 2022 4:47 PM
To: DSpace Technical Support <[email protected]>
Subject: Re: [dspace-tech] DSpace 7 SSL - ui and backend on one domain name

Hi,

this is my configuration:
local.cfg

dspace.server.url = https://dspace.test.pl/server
dspace.ui.url = https://dspace.test.pl

config.prod.yml

ui:
  ssl: false
  host: dspace.test.pl
  port: 4000
  nameSpace: /

rest:
  ssl: true
  host: dspace.test.pl
  port: 443
  nameSpace: /server

and now vhost-ssl.conf in apache looks like:
                ProxyRequests off - thanks Mark
                ProxyPass /server http://localhost:8080/server
                ProxyPassReverse /server http://localhost:8080/server
                RequestHeader set X-Forwarded-Proto https

                #DSpace FRONTEND
                ProxyPass / http://localhost:4000/
                ProxyPassReverse / http://localhost:4000/

errors only appear in apache error.log  (pm2 , catalina, dspace.log is clear)

[Wed Jun 22 12:52:54.365946 2022] [proxy:error] [pid 47109:tid 140596472973056] 
(111)Connection refused: AH00957: http: attempt to connect to 127.0.0.1:4000 
(localhost) failed
[Wed Jun 22 12:52:54.365985 2022] [proxy_http:error] [pid 47109:tid 
140596472973056] [client :51090] AH01114: HTTP: failed to make connection to 
backend: localhost

And i checked: https://dspace.test.pl/server works fine - i see api and 
response 200 success.
Problem is with frontend  https://dspace.test.pl/

Thanks,

Karol
wtorek, 21 czerwca 2022 o 19:23:26 UTC+2 Mark H. Wood napisał(a):
On Tue, Jun 21, 2022 at 11:48:02AM -0500, 'Bill Tantzen' via DSpace Technical 
Support wrote:
> It looks as if your setup is similar to mine, but your apache directives
> are a bit different from the ones suggested in the installation docs (
> https://wiki.lyrasis.org/display/DSDOC7x/Installing+DSpace) for both the
> frontend and the backend -- can you comment on your tweaks?

Let's see:

o <Location "/dspace-v7/"> because I have several distinct instances
of DSpace deployed on the box, and this one is named "dspace-v7".

o "ProxyPass ajp://[::1]:8509/dspace-v7" because I am running several
versions of Tomcat on the box, and that particular instance is
listening for AJP on 8509 rather than the normal 8009.

o The front-end stuff is all because I'm running the front-end raw
rather than in PM2. I needed to ensure that HTTPD doesn't try to
pool connections to it. I should review these settings to see if I
really need them all.

o I have separate ProxyPass and ProxyPassReverse, rather than tucking
it all into the second <Location/>, because the single-argument
form doesn't take options.

> On Tue, Jun 21, 2022 at 9:47 AM Mark H. Wood <[email protected]> wrote:
> > # DSpace v7 demo back-end
> > <Location "/dspace-v7/">
> > ProxyPass ajp://[::1]:8509/dspace-v7/
> > </Location>
> >
> > # DSpace v7 demo front-end
> > <Location "/">
> > SetEnv proxy-nokeepalive 1
> > SetEnv proxy-initial-not-pooled 1
> > </Location>
> > ProxyPass "/" "http://localhost:4000/"; disablereuse=On max=1
> > ProxyPassReverse "/" "http://localhost:4000/";

--
Mark H. Wood
Lead Technology Analyst

University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749<tel:(317)%20274-0749>
www.ulib.iupui.edu<http://www.ulib.iupui.edu>

--
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]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/2f7ecab3-aad5-429e-8d42-f87ac2f7ad59n%40googlegroups.com<https://groups.google.com/d/msgid/dspace-tech/2f7ecab3-aad5-429e-8d42-f87ac2f7ad59n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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 on the web visit 
https://groups.google.com/d/msgid/dspace-tech/PH0PR22MB3274C8249800EC3B34DC5740EDB29%40PH0PR22MB3274.namprd22.prod.outlook.com.

Reply via email to