HomeAdmin ManualSecondary PortalsAdding a Secondary Portal within Microsoft IIS

9.6. Adding a Secondary Portal within Microsoft IIS

There are two ways in which Secondary Portals are typically used.

  1. As a sub-directory so your site. This will create a Secondary Portal under the same domain as your HelpSpot installation, but under a different directory. For example, if HelpSpot is located at http://support.example.com, and you would like a secondary portal at http://support.example.com/portal, the /portal portion of the URL if the sub-directory under which the Secondary Portal will be installed.
  2. As a different domain or subdomain. This will create a Secondary Portal under a domain or sub-domain which is different from your HelpSpot installation. For example, this describes if HelpSpot is located at http://support.example.com, but you'd like the secondary portal to be a different subdomain such as http://portal.example.com OR if you would like the secondary portal to be at a different domain altogether such as http://another-example.com.

Here we will cover how to accomplish either situation.

Assumptions

In both situations, we will cover these basic steps:

  1. Creating a secondary portal within the HelpSpot Admin configuration.
  2. Configuration the secondary portal location within the system (via IIS Manager)
  3. Configuring PHP to be used within the secondary portal.
  4. Create needed PHP files

Note: We're using IIS7 for this configuration and are basing these instructions off of a default installation of a new HelpSpot instance.

Create a Secondary Portal

The first task to complete in either case (sub-directory or additional domain name) is to create a Secondary Portal within HelpSpot's Admin area.

  1. Click to Admin > Customize > Secondary Portal.
  2. Fill out the appropriate forms:
    • Portal Name - This will be the name that portal users see when they visit it. It can be anything you'd like.
    • Portal URL - This will be the full URL for the portal. If you are using a sub-directory, include the directory path. For example, a subdirectory for this field may be http://example.com/portal. If you are using a subdomain or domain, fill that in. An example of a domain would be http://portal.example.com or http://new-example.com.
    • File Directory Path - This should be the full file path for your portal files. If your HelpSpot web files are located in it's default install location of C:\Program Files (x86)\helpspot\helpspot, we recommend putting your Secondary Portal files alongside them. For example, C:\Program Files (x86)\helpspot\new-portal. If this directory does not already exist, you can create it
    • The remaining settings you can set up as you wish. You can find more information on them in the documentation here.
  3. Once you save, you'll be give content to copy and paste into two files, an index.php file and a config.php file. Create these two files in the file location specified (in this example, create C:\Program Files (x86)\helpspot\new-portal\index.php and C:\Program Files (x86)\helpspot\new-portal\config.php) at this time.
    • Ensure that you also create an empty custom_templates directory.

Note that the URL settings in the new Secondary Portal need to match the Virtual Directory or Domain created in the next steps.

Secondary Portal as a Sub-Directory

If you are installing HelpSpot's Secondary Portal in a sub-directory, continue on with these instructions. Otherwise, you can skip to the next section "Secondary Portal as an Additional Domain".

This assumes you have followed the steps above under "Create a Secondary Portal".

By default, HelpSpot installs under a "site", usually the "Default Web Site". Within the Default Web Site, it creates a Virtual Directory named "helpspot" and configures it to work with PHP via the PHP_FastCGI module mapping.

These are the same configurations used to create a Secondary Portal under a new Virtual Directory.

1. Create a New Virtual Directory

Under the same website HelpSpot is under (usually Default Web Site), create a new Virtual Directory by right-clicking Default Web Site (or the name of your site) and choosing "Add Virtual Directory".

Fill out the fields as follows:



2. Configure PHP

Next and lastly, the virtual directory will need to be told to use PHP FastCGI to interpret the PHP files. There are two steps to this.

First, set a Default Document. This tells IIS to search for a document (such as index.php) if no document is specified. A url such as http://example.com/my-portal has no document specified, while http://example.com/my-portal/index.php does.

The document index.php needs to be added as a default document. Click on the new Virtual Directory "new-portal" and then double-click on the Default Document icon. If you do not see index.php listed as a default document, then you can choose the 'Add...' link on the right-hand menu in order to add it as shown.

Next, enable PHP to be run by adding a Handler Mapping. Once again, click on the new-portal Virtual Directory and then double click on the Handler Mappings icon.

PHP FastCGI needs to be added as a handler. Click on the "Add Module Mapping" link on the right-hand menu. The fields are as follows:

  1. Request Path - Let IIS know which documents to use FastCGI with. HelpSpot needs to run any PHP file through Fast CGI, so a wildcard path *.php should be used.
  2. Module - The HelpSpot installer ensures that the FastCGI Module is already available to use. Here we can use that module for this Virtual Directory. Choose "FastCgiModule" from the list of available Modules.
  3. Executable Path - This is the path to the php-cgi.exe file installed by HelpSpot to run PHP. This is installed with HelpSpot and can be found in it's install location. By default, this is "C:\Program Files (x86)\helpspot\php\php-cgi.exe". Note that use of quotes, to account for the space within the file path. Lastly, note that when you check the file path, you may need to set the file type from *.dll to *.exe as pictured below in order to make the php-cgi.exe file visible.
  4. Name - The name is arbitrary. We recommend naming it "PHP FastCGI".
  5. Click OK and then choose Yes to make it an application.


 

Now when you enter http://example.com/my-portal (adjusting the domain as appropriate), you should see the newly created Secondary Portal home page.

Secondary Portal as an Additional Domain

Adding a secondary portal under an additional domain is very similar to adding a new Virtual Directory.

1. Create a New Site

This assumes you have followed the steps above under "Create a Secondary Portal".

In order to use a different domain for the Secondary Portal, create a new Site within IIS. In this example, we'll assume the additional domain will be portal.example.com.

Right-click on Sites and choose "Add Web Site". Fill out the fields as follows:

  1. Site Name - This is arbitrary. In this example, we'll use "Example Portal".
  2. Physical Path - This is the path to the directory created when adding a new Secondary Portal. In this example, we created the "new-portal" directory alongside the main HelpSpot files at C:\Program Files (x86)\helpspot\new-portal.
  3. Type/Binding/Port - These can remain as default in most cases. If you are using an SSL certificate with this additional domain, you may need to change the Type to "https".
  4. Host Name - This is the domain used, in our example portal.example.com.

Configure PHP

In many cases, because HelpSpot is already installed, PHP will already be configured for new sites created within IIS. The settings will often be the same as the Default Web Site.

However, to make sure PHP is properly configured, ensure the following two configurations are set:

Default Document - Ensure the Default Document includes index.php. Within the IIS manager, click on the newly created web site, then double-click the Default Document icon. Ensure that index.php is listed there.

If index.php is not listed, choose the 'Add...' link on the right-hand menu in order to add it as shown.

PHP FastCGI - Ensure that the FastCGI Module is set to run for any PHP file. Once again, click on the newly created web site and double-click the Handler Mappings icon. The setting "PHP FastCGI" should be enabled for the path *.php.

If "PHP FastCGI" is not listed, then it needs to be added as a handler. Click on the "Add Module Mapping" link on the right-hand menu. The fields to complete are as follows:

  1. Request Path - Let IIS know which documents to use FastCGI with. HelpSpot needs to run any PHP file through Fast CGI, so a wildcard path *.php should be used.
  2. Module - The HelpSpot installer ensures that the FastCGI Module is already available to use. Here we can use that module for this Virtual Directory. Choose "FastCgiModule" from the list of available Modules.
  3. Executable Path - This is the path to the php-cgi.exe file installed by HelpSpot to run PHP. This is installed with HelpSpot and can be found in it's install location. By default, this is "C:\Program Files (x86)\helpspot\php\php-cgi.exe". Note that use of quotes, to account for the space within the file path. Lastly, note that when you check the file path, you may need to set the file type from *.dll to *.exe as pictured below in order to make the php-cgi.exe file visible.
  4. Name - The name is arbitrary. We recommend naming it "PHP FastCGI".
  5. Click OK and then choose Yes to make it an application.


 

Now when you enter http://portal.example.com/ (adjusting the domain as appropriate and assuming the DNS settings for the domain are set), you should see the newly created Secondary Portal home page.

This page was: Helpful | Not Helpful