<div dir="ltr">Hi All,<div>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.</div><div>The recommended one is the following location (<a href="https://xen-orchestra.com/docs/reverse_proxy.html">https://xen-orchestra.com/docs/reverse_proxy.html</a>)</div><div><br></div><div><br></div><div><div><span style="white-space:pre">     </span>location /xen {</div><div><span style="white-space:pre">               </span>access_log /var/log/nginx/xen.access.log jru;</div><div><span style="white-space:pre">         </span>error_log /var/log/nginx/xen.error.log debug;</div><div><br></div><div>  <span style="white-space:pre">             </span># Add some headers</div><div>  <span style="white-space:pre">         </span>proxy_set_header        Host $host;</div><div>  <span style="white-space:pre">            </span>proxy_set_header        X-Real-IP $remote_addr;</div><div>  <span style="white-space:pre">                </span>proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;</div><div>  <span style="white-space:pre">            </span>proxy_set_header        X-Forwarded-Proto $scheme;</div><div><br></div><div>  <span style="white-space:pre">            </span># Proxy configuration</div><div>  <span style="white-space:pre">              </span>proxy_pass <a href="http://our_xo-server_on_port_80/">http://our_xo-server_on_port_80/</a>;</div><div><br></div><div>  <span style="white-space:pre">         </span>proxy_http_version 1.1;</div><div>  <span style="white-space:pre">            </span>proxy_set_header Connection "upgrade";</div><div>  <span style="white-space:pre">           </span>proxy_set_header Upgrade $http_upgrade;</div><div><br></div><div>  <span style="white-space:pre">           </span>proxy_redirect default;</div><div><br></div><div>  <span style="white-space:pre">           </span># Issue <a href="https://github.com/vatesfr/xo-web/issues/1471">https://github.com/vatesfr/xo-web/issues/1471</a></div><div>  <span style="white-space:pre">            </span>proxy_read_timeout 1800; # Error will be only every 30m</div><div><span style="white-space:pre">               </span></div><div>  <span style="white-space:pre">           </span># For the VM import feature, this size must be larger than the file we want to upload.</div><div>  <span style="white-space:pre">             </span># Without a proper value, nginx will have error "client intended to send too large body"</div><div>  <span style="white-space:pre">         </span>client_max_body_size 4G;</div><div><span style="white-space:pre">      </span>}</div></div><div><br></div><div><br></div><div>The problem is that browsing to <a href="https://ourserver/xen">https://ourserver/xen</a> is reverse-proxied to <a href="http://our_xo-server_on_port_80/">http://our_xo-server_on_port_80/</a>, but them is redirected to /signin so it is routed to <a href="https://ourserver/signin">https://ourserver/signin</a> and we get a 404 error because it doesn't exist.</div><div>What are we doing wrong?, Do we have to rewrite the requests?.</div><div>Many Thanks in Advance,</div><div>Javier R.</div><div><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Javier Ramírez</div>
</div></div>