We try to set up the awesome knowledge base but we got stuck configuring the custom domain.
Our goal is to have the knowledge base under the domain “kb.your-domain.com”.
If we understand the documentation correctly we should add in zammad.conf around line 14 (just right after the server statement):
# Add following lines to "server" directive
if ($host = kb.your-domain.com ) {
rewrite ^/(api|assets)/(.*)$ /$1/$2 last;
rewrite ^(.*)$ /help$1 last;
}
and later around line 46 (into the location / statement)
# Add following line to "Location /" directive, before other proxy_set_header
proxy_set_header X-ORIGINAL-URL $request_uri;
So far so good, but how do we tell the server to listen to kb.your-domain.com too?
should this info be placed around line 22 in server_name?
since we use the same server but 2 different domains we copied the ngnix server configuration in order to use the right ssl certificate (we do not have wildcards defined).
The custom domain works regarding the KB shows up. Some issues persist:
The directive with rewriting the route help seems not to work if you want to rewrite to a kb.your-domain directly.
“Solution”: use as custom domain kb.your-domain.com/help and add the changes to zammad.conf according to the suggestions made by zammad.
Using a custom domain results in not being able to see “internal” answers although the current user is logged in (as agent / admin).
As previously stated: any feedback is highly appreciated.
If we enter a custom domain without subfolder and we get the nginx working then the KB logo will always try to link back to “/help” otherwise everything would work fine
We currently don’t have a working configuration solution on this.
I’m currently struggling greatly with time ressources whcih is why this topic is being delayed on my end.
I just wanted to point out (because I might loose track of this post), you can subscribe to this issue which I will update as soon as I have a solution. Promised!
Modify nginx to use server_name zammad.example.com kb.example.com;
Add wildcard SSL certificates to Zammad nginx config
Modify nginx again with something quirky like that:
# "FIX": in order to NOT get redirected to #login route if accessing the kb @ kb.example.com
set $fullUrl "$host$request_uri";
if ($fullUrl = "kb.example.com/"){
return 301 https://kb.example.com/help/de-de;
}
# Add following lines to "server" directive
if ($host = kb.example.com ) {
rewrite ^/(api|assets)/(.*)$ /$1/$2 last;
rewrite ^/help(.*)$ /help$1 last;
#rewrite ^(.*)$ /help$1 last;
}
Just as a small follow up:
There’s now a rather bigger write up of configuration possibilities currently being tested and working.
The configurations in the linked comment will soon™ find their way into Zammad.