Top
Host content on your Server
  • 11 Apr 2024
  • 4 Minutes To Read
  • Dark
    Light
  • PDF

Host content on your Server

  • Dark
    Light
  • PDF

Article Summary

Whatfix content can be easily exported and deployed from your servers. Self-hosting is useful when you are on an internal network and cannot access the Flows from the Whatfix cloud, or in cases when your IT security doesn't allow resource loading from remote servers.

your title goes here

Before hosting Whatfix content on your server, ensure that you have exported the production package. For more information, see Export Production Package for Self Hosted Deployment.

Host content on private server

Extract the content of the production package to your server. The extracted folder contains a file called embed.nocache.js inside the embed folder.
settings_export_nocache.png

Add the file as a static file in your application's HTML file as shown in the following.

<script type="text/javascript" src="/public/whatfix.com/embed/embed.nocache.js"></script>

Ensure that your web server has Cache-control set to "no-cache" for the *.nocache.js file so that the request to the origin server is validated before releasing a cached copy.

Popular Web servers and their no-cache settings are listed in the following snippet:

Apache:

<FilesMatch ".(nocache.js)$">
Header set Cache-Control no-cache
< /FilesMatch>

Nginx:

location ~ ^.*(nocache.js)$
{
    add_header Cache-Control no-cache;
}

Host content on Apache web server

Prerequisite: Before you begin with this procedure, you must have a separate, non-root user account with sudo(superuser do) privileges set up on your server.

Extract the content of the production package to your server. The extracted folder contains a file called embed.nocache.js inside the embed folder.
settings_export_nocache.png

Add the file as a static JS file in the section of your application's HTML file as shown in the following:

<script type="text/javascript" src="http://server_ip/whatfix.com/embed/embed.nocache.js"></script>

Refresh your application to see the live Whatfix content.
warning

your title goes here

Ensure that your web server has Cache-control set to no-cache for the *.nocache.js file, so that the request to the origin server is validated before releasing a cached copy.

Host content on Amazon S3

Use the following steps to set up your Amazon S3 bucket to host your content:

  1. Create an S3 bucket (if you don't already have one).
  2. Create a user in Amazon AWS using IAM and give the user write access to S3 under the individual's security policies.
  3. Install Amazon AWS CLI to upload your exported flows directory to your S3.
  4. Configure from the command line using 'configure' command.
  5. Enable static website hosting on your S3 bucket.
  6. Point your browser extension to your S3 URL.

Use the following steps to host Whatfix content on Amazon S3:

Step 1: Export Whatfix content

Before hosting Whatfix content on your server, ensure that you have exported the production package. For more information, see Export Production Package for Self Hosted Deployment.


Step 2: Configure and Upload Content on Step

There are different ways to host your content on Amazon. Host the content directly on Amazon S3 or use it along with Amazon CloudFront. Follow the instructions in Hosting your content on Amazon


Step 3: Change Endpoint URL

  1. Go to your S3 instance and copy the Endpoint URL for your static website hosting.
    end_point_amazon_aws.png
  2. Replace //whatfix.com in your content JS with the Endpoint URL that you copied in the step above.
    set_attrib_whatfix_com.png
  3. Refresh your application and you should be able to view all the exported Flows.
your title goes here

Host content on Microsoft Azure

Use the following steps to set up Azure to access your website content:

  1. Open the Azure portal in your web browser.
  2. Create a storage account (if you don't already have one).
  3. Locate your storage account and display the account overview.
  4. Select Static website to display the configuration page for static websites.
  5. Select Enabled to enable static website hosting for the storage account.
  6. In the Index document name field, specify a default index page of index.html . The default index page is displayed when a user navigates to the root of your static website.
  7. Click Save. The Azure portal now displays your static website endpoint.
  8. Click the " $web" (link to Azure storage container for this account) in this page.
  9. Upload all the static files in this storage and make sure to provide public read access. With this, you can access your website content using the account endpoint.

Use the following steps to host Whatfix content on Azure:

Step 1: Export Whatfix content

Before hosting Whatfix content on your server, ensure that you have exported the production package. For more information, see Export Production Package for Self Hosted Deployment.

Step 2: Configure and Upload Content

There are different ways to host your content on Azure. Click the link below to evaluate your options.
For detailed instructions, see Hosting your content on Microsoft Azure.


Step 3: Change Endpoint URL

  1. Go to your Azure instance and copy the Endpoint URL for your static website hosting.

  2. Replace whatfix.com in your content with the Endpoint URL that you copied in the aforementioned step.
    set_attrib_whatfix_com

  3. Refresh your application to see all the exported content.

your title goes here
  • Once you have hosted your content on Azure, Whatfix recommends using a CDN to serve your content to ensure content scalability and good performance.

  • For more information on setting up your Whatfix content on Azure CDN, see Integrate a static website with Azure.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.