Moving or Restoring Datastores on an Enkompass environment

There are a few scenarios that may require you to move an Enkompass Datastore or restore a failed Enkompass Datastore. There are a few options that are available, some are painful, some are nice and easy. I will walk through the steps below.

As you know an Enkompass installation is limited to a single datastore. This datastore is most comonly connected to a server and then shared using a UNC share or shared from a NAS device utilizing a UNC share. This UNC share CAN NOT CHANGE regardless if you are moving the data or restoring the data, so keep that in mind while creating your plan.

MOVING A DATASTORE:

  1. Have the new destination datastore connected to a server that has full access to your source datastore.
  2. It is very important to retain the permissions of the folder structure so for the move we will use Robocopy to move the data
  3. Where L: is the source and M: is the destination; Run the command: robocopy L: M: /MIR /COPYALL
  4. After the command is complete, verify the permissions on the folders by doing a random sampling on all folders in the datastore.
  5. Once you are satisfied that the copy of data is correct, you can proceed to the final step which is disconnecting the exisitng source datastore and then Share the new datastore. Dont forget to setup the share with the EXACT name as the existing datastore was shared.
  6. Set the share permissions with Full Control for these 5 groups: Everyone, cpadmin, AllUsersGroup, cPanelFtpAdmin, Domain Admins
  7. Enable Quota Management on the new datastore.
  8. I would suggest rebooting all servers after this is completed.

RESTORING A DATASTORE:

  • Have the new destination datastore connected to a server that has full access to your Enkompass domain.
  • Restore all your data from backup to the new Datastore.
  • Once you are satisfied that the copy of data is correct, you can proceed to the final steps below
  • Set the share to the EXACT name (UNC Share) as the existing datastore was named.
  • Set the share permissions with Full Control for these 5 groups: Everyone, cpadmin, AllUsersGroup, cPanelFtpAdmin, Domain Admins
  • Enable Quota Management on the new datastore.
  • At this point Enkompass will work, but you will have errors with all your existing sites. Create two test accounts, 1 reseller and 1 child acct of that reseller.
  • The painfull part is now going through and setting permissions on all your resored folders to match the settings of the accounts you just created.
  • I would suggest rebooting all servers after this is completed.

There are no Guarantees that this documented process will work for every Encompass environment, but it should work for most standard Enkompass setups. Hope this helps those who need it, I like to share what I know. 🙂

Continue Reading

No Bullies!

Something I saw on Facebook. Bullying takes many forms. Take a stand against bully’s!

“The boy you punched in the hall today; Committed suicide a few minutes ago. That girl you called a slut in class today; She’s a virgin. The boy you called lame; He has to work every night to support his family. That girl you pushed down the other day; She’s already being abused at home. That girl you called fat; She’s starving herself. The old man you made fun of cause of the ugly scars; He fought for our country. The boy you made fun of for crying; His mother is dying. You think you know them. Guess what? You don’t!”

Continue Reading

Creating 301 Redirects

PHP Redirect:

<? Header( “HTTP/1.1 301 Moved Permanently” ); Header( “Location: http://www.new-domain.com” ); ?>

In ASP:

Open the old web page and replace all its content with the following code, replacing “www.new-location.com” with the file name of the new page.

<%@ Language=VBScript %> <% Response.Status=”301 Moved Permanently” Response.AddHeader “Location”, “http://www.new-location.com” %>

In ASP .NET:

<script runat=”server”> private void Page_Load(object sender, System.EventArgs e) { Response.Status = “301 Moved Permanently”; Response.AddHeader(“Location”,”http://www.new-location.com”); } </script>

In IIS (on a Windows server):

1. In internet services manager, right click on the file or folder you wish to redirect. 2. Select “a redirection to a URL”. 3. Enter the redirection page. 4. Check “The exact url entered above”, and the “A permanent redirection for this resource”. 5. Click “Apply”.

web.config 301 redirect

The first example will redirect single pages to a new location. For example, important pages of your site have .htm extensions and you want the new location to be its own directory (IE. http://domain.com/services.htm will change to http://domain.com/services/).

1. Open web.config in the directory where the old pages reside 2. Then add code for the old location path and new destination as follows:

<configuration>
  <location path="services.htm">
    <system.webServer>
      <httpRedirect enabled="true" destination="http://domain.com/services" httpResponseStatus="Permanent" />
    </system.webServer>
  </location>
  <location path="products.htm">
    <system.webServer>
      <httpRedirect enabled="true" destination="http://domain.com/products" httpResponseStatus="Permanent" />
    </system.webServer>
  </location>
</configuration>

You may add as many location paths as necessary.

The second example will redirect an entire directory to a new location. For example, if you want http://domain.com/olddir/ redirected to http://domain.com/newdir/ open web.config in /olddir and add the following line of code within the <system.webServer> section:

<httpRedirect enabled="true" destination="http://domain.com/newdir" httpResponseStatus="Permanent" />

Canonical Issues – Redirecting non-www to www:

Some webmasters prefer to redirect domain.com to www.domain.com for search engine optimization purposes. The thought is that some incoming links point to their non-www domain and some point to the www domain. So if the domains are consolidated, incoming links are as well. Webmasters who use this redirect usually see instances of search engine rankings with and without the www in their listings and want to consolidate their efforts.

Canonical Redirect using IIS 7.0

For this to work, you need to download and enable the URL Rewrite module for IIS 7. Then the following code is used in the ASP.NET web.config file:

<configuration>
  <system.webServer>
    <rewrite>
      <rules>
        <rule name="Redirect to WWW" stopProcessing="true">
          <match url=".*" />
          <conditions>
            <add input="{HTTP_HOST}" pattern="^domain.com$" />
          </conditions>
          <action type="Redirect" url="http://www.domain.com/{R:0}"                redirectType="Permanent" />
        </rule>
      </rules>
    </rewrite>
  </system.webServer>
</configuration>

 

Continue Reading

How to configure PathSolutions for use with a proxy server

Details: When a proxy server is used instead of a firewall, the license mechanism may not be able to connect to the PathSolutions license server on the Internet to validate its configuration. Thus, the program may fail to connect when it initially tries to validate its license, or may fail in the future if the proxy server is not properly configured.

Deployment: Microsoft has included a different proxy server configuration tool for different versions of its operating system. Use the below procedure associated with your OS version.

Microsoft Windows NT/2000/2003/XP (32bit)
Internet Explorer should be configured with the correct proxy server settings. Once that is completed, validate that it is working by browsing to the following test page:
https://sub01.nlsubscription.com/test.htm

If the test page works, the same proxy server configuration can be utilized by PathSolutions to validate its license. Enter the following command to configure Windows to use the same proxy configuration as IE:
proxycfg –u
At this point, you should be able to validate your license against the license server using SSL.

Microsoft Windows Vista/2008/7 (32bit)
Internet Explorer should be configured with the correct proxy server settings. Once that is completed, validate that it is working by browsing to the following test page:
https://sub01.nlsubscription.com/test.htm

If the test page works, the same proxy server configuration can be utilized by PathSolutions to validate its license. Enter the following command to configure Windows to use the same proxy configuration as IE:
NetSH WinHTTP import proxy source=ie

At this point, you should be able to validate your license against the license server using SSL.

Microsoft Windows Vista/2008/7 (64bit)
Internet Explorer should be configured with the correct proxy server settings. Once that is completed, validate that it is working by browsing to the following test page:
https://sub01.nlsubscription.com/test.htm

If the test page works, the same proxy server configuration can be utilized by PathSolutions to validate its license. A special 32bit version of the NetSH program must be run to do the configuration.

Use the following procedure:
1) Open a CMD window
2) Change directory to C:\Windows\SysWOW64
3) Enter:
NetSH WinHTTP import proxy source=ie

At this point, you should be able to validate your license against the license server using SSL.

Continue Reading

Configuring SNMP on an ESX/ESXi 4.0 or later

Ensure that the SNMP configuration exists at /etc/vmware/snmp.xml and looks similar to:

<config>
<snmpSettings>
<communities>public</communities>
<enable>true</enable>
</snmpSettings>
</config>

Ensure that there are no white spaces or extra line breaks in the /etc/vmware/snmp.xml file.

If you do not see the file, or you get an “Load persistent store failed” error, you can delete the file and recreate it: 
  1. To create the file manually:
    1. Run this command to rename the /etc/vmware/snmp.xml file as snmp.xml.old:mv snmp.xml snmp.xml.old
    2. Create a new snmp.xml file using a text editor. For example, to create the file using the vi editor, run this command:vi /etc/vmware/snmp.xml
    3. Copy and paste these lines to the file:<config>
      <snmpSettings>
      <communities>public</communities>
      <enable>true</enable>
      </snmpSettings>
      </config>Note: Ensure that you do not have any extra line breaks or white spaces before or after the text.
    4. Save the file.
    5. Run this command to restart the VMware Management service for ESX4.x: service mgmt-vmware restart  OR for ESX 5.x: /etc/init.d/hostd restart
Continue Reading