Reverse proxy error on proxy_pass with redirect on backends to root

javier ramirez frjaraur at gmail.com
Wed Jan 10 14:28:14 UTC 2018


Hi All,
I have been trying to configure our xen-orchestrator environment
(application frontend for controlling Xen servers), published on a host on
port 80. We tried their recommended configuration for NGINX after trying
some others created by ourself but none of them seem to work.
The recommended one is the following location (
https://xen-orchestra.com/docs/reverse_proxy.html)


location /xen {
access_log /var/log/nginx/xen.access.log jru;
error_log /var/log/nginx/xen.error.log debug;

  # Add some headers
  proxy_set_header        Host $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;

  # Proxy configuration
  proxy_pass http://our_xo-server_on_port_80/;

  proxy_http_version 1.1;
  proxy_set_header Connection "upgrade";
  proxy_set_header Upgrade $http_upgrade;

  proxy_redirect default;

  # Issue https://github.com/vatesfr/xo-web/issues/1471
  proxy_read_timeout 1800; # Error will be only every 30m
  # For the VM import feature, this size must be larger than the file we
want to upload.
  # Without a proper value, nginx will have error "client intended to send
too large body"
  client_max_body_size 4G;
}


The problem is that browsing to https://ourserver/xen is reverse-proxied to
http://our_xo-server_on_port_80/, but them is redirected to /signin so it
is routed to https://ourserver/signin and we get a 404 error because it
doesn't exist.
What are we doing wrong?, Do we have to rewrite the requests?.
Many Thanks in Advance,
Javier R.


-- 
Javier Ramírez
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20180110/8c5a01f5/attachment.html>


More information about the nginx mailing list