archiva-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Pola <mar...@kottnet.net>
Subject Error 403 when proxying with Nginx
Date Sat, 12 Aug 2017 08:55:23 GMT
Hello,

I am trying to access Archiva through HTTPS, and from what I have 
understood the easiest way to accomplish that is by having another, 
HTTPS-enabled, web server acting as a proxy.

My Archiva instance listens on 127.0.0.1:8080 and my Nginx server block 
looks like this:
   server
   {
       listen [...]:443 ssl;
       server_name [...]
       underscores_in_headers on;
       
       ssl on;
       ssl_certificate /etc/letsencrypt/live/[...]/fullchain.pem;
       ssl_certificate_key /etc/letsencrypt/live/[...]/privkey.pem;
       
       location /
       {
           include proxy_params;
           proxy_pass http://127.0.0.1:8080;
       }
   }

The included file `proxy_params` contains these lines:
   proxy_set_header Host $http_host;
   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;

When I try to visit the proxy, Archiva doesn't load. Having opened the 
web browser's developer toolkit, the error appears to have been caused 
by a GET request to
   /restServices/archivaServices/commonServices/getAllI18nResources
which the server responded to with error 403 Forbidden. If I try to 
visit Archiva directly, through http://127.0.0.1:8080, the equivalent 
GET request does not return any error. From what I can tell, the same 
request headers seem to be sent, and the same response headers are 
received.

What could be causing the issue, and how should I proceed to resolve it?

Kind regards,
Martin Pola

Mime
View raw message