Help Needed: DSpace 7.6.1 HTTPS Access Issue with Nginx Reverse Proxy - Windows 10

211 views
Skip to first unread message

Sidney Campos

unread,
Dec 9, 2023, 9:43:58 AM12/9/23
to DSpace Community
Good afternoon, friends. I hope you are well.

I need help with the HTTPS access to my DSpace 7.6.1, with Tomcat 9 and Nginx as a reverse proxy on a Windows 10 server. This is my first installation of the platform, and everything went smoothly in the process. I can access the platform locally at "localhost:4000." I configured my Nginx, and when I try to access it from outside the local network, it loads the page correctly but after 2 seconds, I am redirected to a 500 error page.

This is my Nginx configuration:

server {
    listen 80;
    server_name fevasf-repositorio.ddns.net;
    rewrite ^ https://fevasf-repositorio.ddns.net permanent;

    location / {
        proxy_pass http://localhost:4000;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

server {
    listen 443 ssl;
    server_name fevasf-repositorio.ddns.net;

    ssl_certificate C:/nginx-1.25.3/cert/cert.pem;
    ssl_certificate_key C:/nginx-1.25.3/cert/privkey.pem;

    location / {
        proxy_pass http://localhost:4000;
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }

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

This is my "config.prod.yml" configuration:

ui:
  ssl: false
  host: localhost
  port: 4000
  nameSpace: /
  rateLimiter:
    windowMs: 60000 # 1 minute
    max: 500 # limit each IP to 500 requests per windowMs
  useProxies: true

rest:
  ssl: false
  host: localhost
  port: 8080
  nameSpace: /server

This is my "local.cfg" configuration:

space.server.url = http://localhost:8080/server
dspace.ui.url = http://localhost:4000

This is my Tomcat "server.xml" configuration:

<Connector port="8080"
    minSpareThreads="25"
    enableLookups="false"
    redirectPort="8443"
    connectionTimeout="20000"
    disableUploadTimeout="true"
    URIEncoding="UTF-8" />

And finally, this is the error in the Nginx log:

2023/12/08 13:30:18 [error] 5856#5432: *394 connect() failed (10061: No connection could be made because the target machine actively refused it) while connecting to upstream, client: 192.241.215.42, server: fevasf-repositorio.ddns.net, request: "GET /autodiscover/autodiscover.json?@zdi/Powershell HTTP/1.1", upstream: "http://127.0.0.1:4000/autodiscover/autodiscover.json?@zdi/Powershell", host: "189.41.79.255"

I have tried various configurations without success. Can someone shed some light? I am a beginner in working with DSpace and have been trying for a week.

Leonardo Pinheiro

unread,
Dec 22, 2023, 11:35:30 AM12/22/23
to DSpace Community
Hi,

I'm having the same issue here, but on a Linux server. 
Did anyone find a solution or more information on how to fix this?

Thx

DSpace Community

unread,
Jan 16, 2024, 1:17:44 PM1/16/24
to DSpace Community
Hi Leonardo,

If you are still encountering this issue, see the answers to this question on the dspace-tech (Tech Support) mailing list: https://groups.google.com/g/dspace-tech/c/EFHJAUmhei4/m/0aiJM30KAQAJ

Some of the questions on this list end up cross posted to other locations (as this one was).  The answers may only appear in one location (often the dspace-tech list as that list is more specific to technical issues & support).

Tim

Reply all
Reply to author
Forward
0 new messages