Category Archives: Internet

Generate an SSL Certificate Signing Request (CSR) on IIS7

What is a CSR?  A Certificate Signing Request or CSR is a specially formatted encrypted message sent from a Secure Sockets Layer (SSL) digital certificate applicant to a certificate authority (CA). The CSR validates the information the CA requires to issue a certificate. A CSR must be created before ordering and purchasing an SSL certificate (or activating an SSL certificate already purchased through your domain registrar). How a CSR is generated depends on the web server software used. Once the CSR is generated, it can be submitted to the CA. If the request is successfully validated, the CA will issue the SSL certificate.

Here are the steps to generate a CSR in IIS7 on Windows Server 2008 R2.  Why might this be necessary?  Well, you may want to install Microsoft Exchange and connect to it via Outlook or Outlook Web Access (OWA) which would require Secure Socket Layer (SSL).

  • Click Start
  • Select Administrative Tools
  • Start Internet Information Services (IIS) Manager
  • Click the Server Name
  • Double click on the “Server Certificates” button in the “IIS” section, located int he center menu

Image from Namecheap.com

 

  • Choose the “Actions” menu (on the right)
  • Click on “Create Certificate Request (Note: Even if you are renewing an SSL certificate that may be about to expire, use the CREATE Certificate Request and do NOT select renew).

From Namecheap.com

 

  • The Request Certificate wizard will be opened. From here, you will need to enter the information required for the CSR code (details and example listed below):

Image from Namecheap.com

 

Common Name: e.g. yourdomain.com or, if you are creating a CSR for your mail server’s subdomain, then enter something like this containing your server’s host header:  mx.yourdomain.com or mail.yourdomain.com

Organization: MyCompany Ltd

Organization Unit (eg, section): Communications, IT, Support, Sales etc.

City/ Locality Name: Los Angeles

State or Province Name (full name): California

Country Name (2 letter code): US

Image from NameCheap.com

  • Specify a filename and location to save your CSR code (e.g. c:\certificate\certreq.txt)
  • Click Finish

Image from NameCheap.com

You may view the CSR file using a text editor such as Notepad++ and the certificate request should appear like this:

Image Omitted for security reasons.

Note:  When Installing the newly issued (renewal) certificate issued to you by your CA, you must first REMOVE the existing certificate from IIS7 because there will be an installation conflict (between the new certificate and the existing certificate that is still installed on the server. In other words, an error will occur during installation of the new certificate if the existing certificate is not first removed.

This article is based substantially upon Namecheap.com support knowledge base article:

https://www.namecheap.com/support/knowledgebase/article.aspx/9426/0/iis-7

After your new or renewal SSL certificate is issued to you and arrives via email, you may follow these instructions to install it on IIS7, but watch out for the known bug in IIS7.

https://support.comodo.com/index.php?/Knowledgebase/Article/View/639/0/certificate-installation-microsoft-iis-7x—8x

When you click “Complete Certificate Request” in IIS7 management console, and then browse to find your newly issued *.cer file, when you click Open, you may receive an error message about a “Conflict” explaining that the CSR may not have been issued by the server where you are installing the *.cer file, which is nonsense.

Just continue hitting Retry or OK button a couple times, then hit the cancel button.  Refresh the screen in IIS7 Management Console and see if your new certificate is listed there without a Friendly Name associated with it.  That is GOOD.  Do not remove the installed certificate.  Now go to do the Bindings on the IIS7 Default Web Site.  See the Second Link (last article) listed two paragraphs above.

Once the bindings are established to https on port 443, then you must restart the default website from within the management console.

Go test that your website can be viewed via https://

The last few lines of the tutorial say:

Click ‘OK’ on the ‘Web Site Bindings’ Window to complete the install.

Important: You must now restart IIS / the website to complete the install of the certificate.

 If none of this works, you may have to generate a new CSR and get the certificate re-issued from your CA.

 

Installing an SSL Certificate to Apache on Windows

This is for a Symantec certificate but should work the same with other certificates like Positive SSL issued by Comodo. Pay attention to the paths for certificate and CA chain files.

In Zpanel, instead of looking here c:/Program Files/apache/etc for help, maybe explore these paths:

c:/zpanel/configs/apache/httpd-vhosts.conf

c:/zpanel/bin/apache/OPENSSL-README.txt

c:/zpanel/fin/conf/openssl.cnf

A good question at this point is how to first prepare an SSL Certificate Request to be sent to the certificate authority (CA) so that a certificate can be issued to you by the CA.

Organize WordPress Blog Posts into Categories Listed as Menu Topics

Log into your WordPress dashboard and in the dashboard menu under “Posts”  select “Categories.”  Add a new category such as “Press Releases” and enter “press-releases” as the slug.   Click the “Save Menu” button.  Repeat this procedure if you need to add more new categories.

Make sure that you have already setup a website navigation menu for the front-end of your website.

On the dashboard menu under “Appearance” select “Menus.” Under “Categories,” select to “View All” of the available categories which you have added.  Click the check box next to the particular category title that you want to add as a menu topic to your navigation menu, and then click the button that says “Add to Menu.” Drag the menu topics into your desired order within the Menu. Save.

Whenever you create a blog post, select the category or categories where you would like to see your particular post grouped.  Then, publish or update your post.

On the front end of your WordPress website, you should be able to select the menu-category and all of your posts that you assigned to that particular category will appear on the same page, usually in the order of the most recent posts first near the top.  In other words, each category is like an archive of all the posts to which the particular category has been assigned.

When you customize your site for where blog entries and articles are posted, you can setup a static front-page and select a different web page on your site (or possibly no page at all) where all your posts will appear regardless of category assigned.  I will need to test the “no page selected for blog posts”  scenario.

Here is a much more detailed article on the topic, including organizing into sub-categories.

https://www.it.umass.edu/support/blogs/blog-posts-organize-posts-categories

Solved Cubecart MemCached error Open_BaseDir Restriction

Upon first install of CubeCart 6.0.6 on windows with apache and zpanel, you may receive the following warnings and errors at the beginning of the install and at the top of every cart/html page, as well as admin panel, following the install:

Warning: file_exists(): open_basedir restriction in effect. File(C:\php\pear/memcached.class.php) is not within the allowed path(s): (c:/zpanel/hostdata/username/public_html/your_domain;c:/windows/temp) in C:\zpanel\hostdata\username\public_html\your_domain\classes\autoloader.class.php on line 89 Warning: file_exists(): open_basedir restriction in effect. File(C:\php\pear/memcached.php) is not within the allowed path(s): (c:/zpanel/hostdata/username/public_html/your_domain;c:/windows/temp) in C:\zpanel\hostdata\username\public_html\your_domain\classes\autoloader.class.php on line 92 Warning: file_exists(): open_basedir restriction in effect. File(C:\php\pear/memcache.class.php) is not within the allowed path(s): (c:/zpanel/hostdata/username/public_html/your_domain;c:/windows/temp) in C:\zpanel\hostdata\username\public_html\your_domain\classes\autoloader.class.php on line 89 Warning: file_exists(): open_basedir restriction in effect. File(C:\php\pear/Memcache.php) is not within the allowed path(s): (c:/zpanel/hostdata/username/public_html/your_domain;c:/windows/temp) in C:\zpanel\hostdata\username\public_html\your_domain\classes\autoloader.class.php on line 92

Solution.  If memcached is not installed on your server, force “file” cache by adding the following line to the includes/global, inc:

$glob[‘cache’] = ‘file’;

That should be your solution.  I restarted apache, cleared my cache under maintenance in the admin dashboard, and then reloaded my website homepage.  Surprise, no warning or errors:

2015-07-26-CubeCart

ALSO SEE: https://forums.cubecart.com/topic/49962-warning-memcacheconnect-cant-connect-to-12700111211-connection-refused-111-in-classescachememcacheclassphp/  in case Memcached is not being properly accessed.