|
| 1 | +Custom Knowledge Base URL with NPM |
| 2 | +================================== |
| 3 | + |
| 4 | +If you want to publish Zammad's knowledge base under a different URL than the |
| 5 | +default one, you can follow our configuration example using |
| 6 | +`NPM (Nginx Proxy Manager) <https://nginxproxymanager.com/>`_ below. |
| 7 | + |
| 8 | +Configure Zammad |
| 9 | +---------------- |
| 10 | + |
| 11 | +.. figure:: /images/appendix/custom-kb-url/kb-custom-url.png |
| 12 | + :alt: Screenshots shows the custom URL tab in Zammad's KB settings |
| 13 | + :scale: 70% |
| 14 | + |
| 15 | +- Go to "Knowledge Base" in Zammad's admin settings and select the "Custom URL" |
| 16 | + tab |
| 17 | +- Add the URL you want to publish your knowledge base under and click the |
| 18 | + **Submit** button |
| 19 | +- Click on the **Web Server Configuration** button to get the configuration for |
| 20 | + your NPM. You can already copy the snippet or just leave it open, it is |
| 21 | + needed for the NPM configuration. |
| 22 | + |
| 23 | +.. figure:: /images/appendix/custom-kb-url/kb-custom-url-dialog.png |
| 24 | + :alt: Screenshots shows the web server configuration dialog for custom KB URL |
| 25 | + :scale: 70% |
| 26 | + |
| 27 | +Configure NPM |
| 28 | +------------- |
| 29 | + |
| 30 | +In NPM, add a new proxy host with the following parameters: |
| 31 | + |
| 32 | +Details tab |
| 33 | + - **Domain Names**: the domain under which you want to publish your |
| 34 | + knowledge base |
| 35 | + - **Forwarded Hostname / IP**: the host/IP of your Zammad instance |
| 36 | + - **Forward Port**: the port of your Zammad (by default ``8080`` in |
| 37 | + Portainer deployment) |
| 38 | + |
| 39 | + .. figure:: /images/appendix/custom-kb-url/npm-details-tab.png |
| 40 | + :alt: Screenshots shows NPM configuration dialog with details tab |
| 41 | + :scale: 70% |
| 42 | + |
| 43 | +Custom location tab |
| 44 | + - **Define location**: ``/`` |
| 45 | + - **Forward Hostname / IP**: Same as above |
| 46 | + - **Forward Port**: Same as above |
| 47 | + - Click on the Cogwheel to open the custom location configuration text field |
| 48 | + and paste ``proxy_set_header X-ORIGINAL-URL $request_uri;`` (the lower |
| 49 | + part of Zammad's snippet) |
| 50 | + |
| 51 | + .. figure:: /images/appendix/custom-kb-url/npm-custom-locations-tab.png |
| 52 | + :alt: Screenshots shows NPM configuration dialog with custom locations tab |
| 53 | + :scale: 70% |
| 54 | + |
| 55 | +Advanced tab |
| 56 | + - **Custom Nginx Configuration**: Add the upper part of Zammad's snippet, |
| 57 | + which should be similar to the following one: |
| 58 | + |
| 59 | + .. code-block:: |
| 60 | +
|
| 61 | + # Add following lines to "server" directive |
| 62 | + if ($host = help.your.domain ) { |
| 63 | + rewrite ^/(api|assets)/(.*)$ /$1/$2 last; |
| 64 | + rewrite ^(.*)$ /help$1 last; |
| 65 | + } |
| 66 | +
|
| 67 | + .. figure:: /images/appendix/custom-kb-url/npm-advanced-tab.png |
| 68 | + :alt: Screenshots shows NPM configuration dialog with custom locations tab |
| 69 | + :scale: 70% |
| 70 | + |
| 71 | +After following these steps, your knowledge base should be published under a |
| 72 | +custom URL. You can test it by clicking the preview button in your knowledge |
| 73 | +base. |
| 74 | + |
0 commit comments