Login

Recover Your Password

How to Configure the New Server and Add a Web Application

This article will guide you through using the Contensive configuration tool to configure your web server to utilize a web application that you will also create. The required server environment is a Windows server (or laptop) with an IIS Web Server and SQL Server Express installed.

  1. Create an AWS EC2 server instance with Windows Server 2019+ and IIS Web Server. For details see the following article: How to Create an Amazon Windows 2019 Server for Contensive

  2. Download and install the Configuration Tool from http://contensive.io/downloads.
    NOTE: This installs two features, the command line configuration utility and a windows service for managing background tasks.

  3. Use the configuration tool to first configure a Server Group:

    NOTE: A Server Group holds the settings for resources used by all applications in the group like connection strings for Db servers, the file system, etc. A Server Group also holds multiple servers that execute the aforementioned applications. Numerous servers and applications can be contained in one Server Group.


    Run command prompt as administrator. Navigate to c:\Program Files (x86)\kma\contensive5. Run 'cc' with no arguments for a list of available commands. Run 'cc --status' (note the double minus) for the status of the current Server Group. You can redo the following instructions at any time to re-configure the Server Group that we are about to create.

    run >cc --configure

    >> Enter the Server Group Name: (Name the Server Group anything you want like "staging" or the customer's name)

    >> Production Server (y/n)?: (This property can be read by applications in order to enable/disable certain features. Enter 'y' if your web app will be for public use, else 'n' if your web app is for testing purposes)

    >> Local File System (y/n)?: (Enter 'y' for this example)

    >> Enter the drive letter for data storage: (Self-explanatory, enter 'c' or 'd' for example)

    >> SQL Server Endpoint: (Enter "(local)" for this example)

    >> native sqlserver userId: (The user login for this server group. This login is the credentials used to log into SQL Server Manager.)

    >> native sqlserver password: (The password)

    >> Use (l)ocal cache or (m)emcached server?: (Enter 'l' for this example)

  4. Create an application in the Server Group.

    NOTE: An application is the solution you are creating. It could be a website with 100 servers, a database program that processes data periodically, etc.


    run >cc -n

    You will be prompted for the following:
    1. Application Name
      Enter a name for your application eg. myApp.
    2. Admin Route
      This will be the path you use for the administration site (where you edit data) if your path is online. The default is "admin".

    3. Primary Domain Name
      Enter a domain name that will be used to reach the application (if applicable). You can change this or add many more later.

    4. App Files
      This is the file folder where the website files such as scripts will run, typically wwwRoot. Enter to accept the default path.

    5. cdn Files
      This is the file path where uploaded files will be stored if they will be available online (this is remote AWS S3 bucket in non-local Server Groups).

    6. Private Files
      This is the file path where the application will store files that should not be mapped to the web server. Enter to accept the default path.

    7. Temp Files
      This is the file path used for files that have a temporary usage. Enter to accept the default path.

    8. Files url
      This is the prefix used within the website programming. Enter to accept the default path.

  5. Download the default sample website zip file from http://contensive.io/downloads and import it into the new IIS site using IIS Web Deploy 3.6+
    1. Verify in Server Roles and Features that IIS Management Tools are all installed. If not, be sure to uninstall Web Deployment before installing Web Deploy.
    2. Restart IIS Manager and the deploy option should now be available when you right-click your site.
    3. Finally, right-click on the site and select Deploy >> Import. Select the downloaded default website and complete the import.
  6. If this server will also be used to run background worker processes, verify installation of the Contensive Task Service and start it. 
    1. Open Windows Services and if Contensive Task Service is not in the list, use the windows install utility to add the service
      1. cd \Program Files\Contensive
      2. execute \Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe TaskService.exe
    2. In Windows Services start the task service and change to automatic start.
  7. To make the command line utility easier to use, add to the system path
    1. from the command line, search for "environment variables" and click on "Edit the System Environment Variables"
    2. On the advanced tab, click the [Environment Variables] link
    3. In System Variables, double click on Path and add the path c:\program files\contensive\
  8. Create a root account login
    1. from the command line, run the command > cc -a sitename --addroot
    2. It will create an account that expires in 1 hour and display the password
  9. Login to the admin site and setup important initial settings
    1. If you are getting a red domain error at the top, the current domain needs to added to the domain table. On the top nav, click settings and click domains (or search for domains), and add the current domain with Normal type and add the default landing page and default template.
    2. Go to settings in the upper-right, and click on Site Settings
    3. In the email tab
      1. set a valid email address for both Admin Email Address and Default From Email Address
      2. check the box [Use AWS Simple Email Service (SES)].
    4. For Email Spam Footer, enter what every email should include at the bottom to unsubscribe. Link the click with <link>message</link>. If you will include a custom unsubscribe in each email, leave this blank.
    5. In Security, verify the important settings for this site.
      1. Allow Plain Text password (false recommended)
      2. Clear Plain-Text on conversion (true recommended)
      3. Min length, required characters, block used passwords, and lockup period
      4. Website tab, Favicon - if the site will include a set of favicon files uploaded manually to the www root directory. Uploading a file here for a simpler quick solution
  10. Setup a 404 page
    1. Go to the admin site and create a new page (Content icon, Page Content) with the name "/ErrorPages/404" and the appropriate content.
    2. Go to this page by going to the domain name /ErrorPages/404
    3. In the tool panel turn on Widgets and drag a text block (in Content category) on to the page.
    4. Edit the content
    5. Go to IIS manager and click on Error Pages
    6. Click on 404, and add /ErrorPages/404 into "Execute a URL on this site". On the right click Edit Feature Settings and click Custom Error Pages
    7. This page may be requested frequently and if complex may be a performance problem. If this is the case, after creating the page, use your browser or CURL to request the page and save it to an html file. Save it as an document named ErrorPages-404.html in the root folder and change the iis Custom Error Pages to this url
Posted By Jay Kidwell | 4/13/2019 10:55:39 PM
 

Subscribe By Email

Email*

Search