Hi
I have installed DSpace 7.5 on Ubuntu 22.04, both the backend and the front 
end on the same VPS server. It worked for a few days with the URL 
mysubdomain.edu:4000, but then showed the message 500 Service Unavailable.
Now I'm trying to reconfigure the server to use the COMODO SSL TrustLogo I 
got for the server. I installed Nginx to add HTTPS to my server, and I 
changed the configuration like this:
*#NGINX CONFIG*
server {
 listen 80;
   server_name mysubdomain.edu;
   rewrite ^ https://mysubdomain.edu permanent;
}

server {
    listen 443 ssl;
    server_name mysubdomain.edu;

    ssl_certificate /etc/ssl/bundle.crt;
    ssl_certificate_key /etc/ssl/mysubdomain.edu.key;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';

    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;
    }

    location /solr {
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header X-Forwarded-Host $host;
        proxy_pass http://localhost:8983/solr/;
    }
}

*#BACKEND local.cfg*
dspace.server.url = https://mysubdomain.edu/server
dspace.ui.url = https://mysubdomain.edu
solr.server = https://mysubdomain.edu:8983/solr

*#FRONTEND config.prod.yml*
ui:
  ssl: false
  host: localhost
  port: 4000
  nameSpace: /

rest:
  ssl: true
  host: mysubdomain.edu
  port: 443
  Namespace: /server

*#TOMCAT *
<Connector port="8080" protocol="HTTP/1.1"
                        minSpareThreads="25"
                        enableLookups="false"
                        connectionTimeout="20000"
                        disableUploadTimeout="true"
                        URIEncoding="UTF-8"/>

   <Connector protocol="AJP/1.3" port="8009" redirectPort="8443" 
URIEncoding="UTF-8" />

*#dspace-ui.json*
{
    "apps": [
        {
           "name": "dspace-ui",
           "cwd": "/root/dspace-frontend/",
           "script": "dist/server/main.js",
           "instances": "max",
           "exec_mode": "cluster",
           "env": {
              "NODE_ENV": "production",

        "DSPACE_UI_SSL": "false",
        "DSPACE_UI_HOST": "localhost",
        "DSPACE_UI_PORT": "4000",
        "DSPACE_UI_NAMESPACE": "/",
        "DSPACE_REST_SSL": "true",
        "DSPACE_REST_HOST": "mysubdomain.edu",
        "DSPACE_REST_PORT": "443",
        "DSPACE_REST_NAMESPACE": "/server"
           }
        }
    ]
}

*yarn test:rest*
yarn run v1.22.19
$ ts-node --project ./tsconfig.ts-node.json scripts/test-rest.ts
Building production app config
Overriding app config with /root/dspace-frontend/config/config.yml
Overriding app config with /root/dspace-frontend/config/config.prod.yml
...Testing connection to REST API at https://mysubdomain.edu/server/api...

RESPONSE: 404

ERROR: INVALID DSPACE REST API! Response is not valid JSON!




The Frontend still shows the same error 500 Service Unavailable at the URL 
https://mysubdomain.edu/ although the browser shows the connection is 
secure. Also, I can't access the Backend using the URL 
https://mysubdomain.edu/server/api, it shows the message HTTP Status 404 – 
Not Found.
The firewall is active and allows traffic on ports 80, 4000, 443/TCP, Nginx 
HTTPS, and Nginx Full.
I don't know if I have something misconfigured or missing on my server or 
if I should edit it.
Please, if anyone has advice for me, I would appreciate the help.
Thanks,
Hajar




-- 
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/41ea3906-8380-4b48-87d8-c53f76f0bd19n%40googlegroups.com.

Reply via email to