Proxying Unstack on the same domain as your web app

This requires advanced knowledge, please consult your developer.

What is proxying?

Proxying, specific to Unstack is the ability to use the site you create in Unstack on your domain where you are already running a web application.

Details / Use Case

In some cases, companies have a hard requirement their web application be on the root domain of their website (e.g. https://yourapp.com). Unstack provides options to proxy web traffic to your root domain to give you the best of both worlds. Note, this is advanced functionality and typically requires an engineer to set up.

Web Server Implementations

Nginx

What these mean:

  1. Host tells the Unstack load balancer the URL your visitors are hitting on your web server. This will get overridden by the load balancer, but it’s important to pass this if you’re using an http scheme, as the load balancer may otherwise return a redirect to an https scheme.
  2. X-Proxy-Host tells Unstack the URL your visitors are hitting on your web server. This helps us tie your traffic to your site.
  3. X-Proxy-Forwarded-For tells Unstack the IP address of your visitors’ browsers, so that we can properly record the analytics for them.

Operating System Considerations

Depending on your operating system, there’s a chance you may also need to handle domain resolution in the proxy process.

Ubuntu

For Ubuntu, you’ll probably need to set up a resolver in /etc/nginx/nginx.conf:

You may also have to install  dnsmasq as a handler for the DNS resolution.

sudo apt install dnsmasq

In other flavors of Linux, or if you’re using Docker containers, you may have to disable conflicting resolvers.