I’m trying to get Octopus working behind a reverse proxy, Nginx.
But I get an error when accessing the site:
Sorry, could not connect to the Octopus Deploy server.
There was a problem with your request.
The error occurs when requesting http://octopus.aceofspace.se/api/users/me
Which returns a “403 Forbidden: all proposed auth schemes denied” response.
Octopus works when accessing it locally.
My guess is that it is some header setting missing in the proxy but I don’t know which.
Here is the config. I have just thrown in as much things I could find and the commented stuff is some of the things I’ve tested.
server {
listen 80;
server_name octopus.example.com;
error_log logs/octopus.log error;
location / {
proxy_http_version 1.1;
proxy_set_header Host 127.0.0.1:8080;
proxy_set_header X-Forwarded-Host octopus.example.com;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
#proxy_set_header Authorization Bearer;
#proxy_set_header Authorization 'OctopusApiKey realm="octopus.example.com"';
#add_header Authorization 'OctopusApiKey realm="octopus.example.com"';
proxy_cookie_domain localhost octopus.example.com;
proxy_pass http://127.0.0.1:8080;
}
}