Nginx, Let's encrypt SSL and No _links section found at https://dspace.univ-tam.dz/server/api

207 views
Skip to first unread message

Abesse Smahi

unread,
May 6, 2023, 10:16:15 AM5/6/23
to DSpace Technical Support
Hi
I've generated a Let's encrypt SSL certificate for my Dspace and i am using Nginx as reverse proxy.
If i disable ssl in the Nginx everything works properly. 
But when i enable ssl the frontend start complaining by show the error: 
 No _links section found at https://dspace.univ-tam.dz/server/api

the rest api works properly 

{"dspaceUI": "https://dspace.univ-tam.dz","dspaceName": "DSpace at University of Tamanrasset","dspaceServer": "https://dspace.univ-tam.dz/server","dspaceVersion": "DSpace cris-2022.03.00","type": "root","_links": {"actuator": {"href": "https://dspace.univ-tam.dz/server/actuator"},"auditevents": {"href": "https://dspace.univ-tam.dz/server/api/system/auditevents"},
..... removed for brevity
the following is the Nginx config
server {
    listen 80;
    server_name dspace.univ-tam.dz;

    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl;
    server_name dspace.univ-tam.dz;

    ssl_certificate /etc/letsencrypt/live/dspace.univ-tam.dz-0001/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/dspace.univ-tam.dz-0001/privkey.pem;

    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_ciphers 'TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384';
    ssl_prefer_server_ciphers on;

    location /server {
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Host $host;
        proxy_pass http://localhost:8080/server;
    }

    location / {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Host $http_host;

        proxy_pass http://localhost:4000;
    }
}


Please help

DSpace Technical Support

unread,
May 8, 2023, 11:41:47 AM5/8/23
to DSpace Technical Support
Hi,

That "No _links section found" error is listed in our Common Installation Issues section of the documentation.  It's likely either a configuration issue, or you may need to add the SSL Chain file to your SSL cert configuration.  See docs at https://wiki.lyrasis.org/display/DSDOC7x/Installing+DSpace#InstallingDSpace-%22No_linkssectionfoundat...%22errorfromUserInterface 

Tim

Abesse Smahi

unread,
May 9, 2023, 1:33:36 AM5/9/23
to DSpace Technical Support
My issue can be split in two part, the first is at Nginx config level, but i am fortunate that Mr. '
Mohammad S. AlMutairi ' send me an Nginx config file that fixes the first part.
The second one is at Hosting company level, for some reason their  firewall or routers is miss configured, even when installing Let's encrypt certificate with the appropriate Nginx config it keep throwing the following error: "SSL_ERROR_RX_RECORD_TOO_LONG"
But changing the provider fixes the issue.
Reply all
Reply to author
Forward
0 new messages