ProxyPass doesn't work in .htaccess, and most shared hosts turn proxying off. Move your DNS to Cloudflare and follow the Cloudflare guide instead.
Put your help center on a sub-folder with Apache
Serve your help center at a path on a site that runs on Apache HTTP Server 2.4, such as yourcompany.com/help, with three proxy rules in your site's virtual host.
Needs a payment method on file, which a trial with a card meets. Owners and admins can change this.
Set it up
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.
Turn on the proxy modules
Apache needs mod_proxy, mod_proxy_http, mod_ssl and mod_headers. On Debian and Ubuntu, run sudo a2enmod proxy proxy_http ssl headers.
Add the rules and reload
Add the config below to the virtual host for your site, replace PROXY_HOST with the proxy host and www.yourcompany.com with your site's host, then check it with apachectl configtest and reload Apache.
# Inside the <VirtualHost *:443> block for www.yourcompany.com
SSLProxyEngine on
ProxyPreserveHost off
ProxyPassMatch "^/help$" "https://PROXY_HOST/"
ProxyPass "/help/" "https://PROXY_HOST/"
ProxyPass "/_ferndesk/" "https://PROXY_HOST/_ferndesk/"
<LocationMatch "^/(help$|help/|_ferndesk/)">
RequestHeader set X-Ferndesk-Base-Path "/help"
RequestHeader set X-Ferndesk-Original-Host "www.yourcompany.com"
</LocationMatch>The trailing slash on the second rule's
https://PROXY_HOST/removes/helpfrom every path below it, so keep it. The first rule passes/helpon as it is, and Ferndesk serves it as your help center's home page.ProxyPreserveHost offsends the proxy host as theHostheader. With it on, every page fails with a 500 Proxy Error.Apache uses the first
ProxyPassrule that matches, so put these above any rule that sends/to your app.
We tested this config with Apache 2.4.71 in Docker against a live Ferndesk help center, following Apache's mod_proxy documentation. If something doesn't work on your setup, email [email protected] with your config and the address that fails.
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.
Common questions
The help center loads without styling
The /_ferndesk/ rule is missing. It serves the help center's scripts and styles from the root of your domain.
Apache shows a 500 error on /help
Check that ProxyPreserveHost is off, that SSLProxyEngine on is inside the same virtual host, and that mod_ssl is loaded. Apache's error log names the missing piece.
For a subdomain instead, or for other hosts, see Connect a custom domain to your help center.