Put your help center on a sub-folder with Nginx
Serve your help center at a path on a site behind Nginx, such as yourcompany.com/help, with three location blocks.
Needs a payment method on file, which a trial with a card meets. Owners and admins can change this.
Set the sub-folder in Ferndesk
In Help Center > Customize > Custom Domain, choose Custom sub-folder, enter your site's domain and a path such as /help, and click Configure subdirectory. Copy the Proxy host we show you (it looks like yourcompany.hc.ferndesk.com). The examples below use /help and www.yourcompany.com; replace them with your own.
Add the location blocks
Add this inside the server block for your site, replace PROXY_HOST with your proxy host, and reload Nginx. Keep the larger proxy buffers: with the defaults, Nginx returns 502 Bad Gateway because our pages send large headers.
# Inside the server block for www.yourcompany.com
proxy_buffer_size 32k;
proxy_buffers 8 32k;
proxy_busy_buffers_size 64k;
location = /help {
proxy_pass https://PROXY_HOST/;
proxy_ssl_server_name on;
proxy_set_header X-Ferndesk-Base-Path /help;
proxy_set_header X-Ferndesk-Original-Host $host;
}
location /help/ {
proxy_pass https://PROXY_HOST/;
proxy_ssl_server_name on;
proxy_set_header X-Ferndesk-Base-Path /help;
proxy_set_header X-Ferndesk-Original-Host $host;
}
location /_ferndesk/ {
proxy_pass https://PROXY_HOST;
proxy_ssl_server_name on;
proxy_set_header X-Ferndesk-Base-Path /help;
proxy_set_header X-Ferndesk-Original-Host $host;
}The trailing slash on proxy_pass https://PROXY_HOST/; is what removes /help from the path, so keep it on the first two blocks and leave it off the /_ferndesk/ block.
Check that it works
Open https://www.yourcompany.com/help. Your help center should load with its styling, and links between articles should stay on your domain. If something is off, see Troubleshoot your help center.
For a subdomain instead, or for other hosts, see Connect a custom domain to your help center.