Category Archives: Web Hosting

Converting key and certificate files to .pfx file

Published August 20, 2014 5:33 pm

A quick search on net will give you openssl pkcs12 command to achieve this.

steps:

  1. download openssl if you don’t have already.
  2. inputs – private rsa key. If you have encoded text from the webhost, save it in a text file. I put it in a private.key
  3. inputs – domain key – I received a .crt file for this.
  4. inputs – I received 2 intermediate certificates and one root certificates – all .crt files
  5. command line – openssl pkcs12 -export -out a.pfx -inkey private.key -in domainkey.crt -certfile f1.crt -certfile f2.crt -certfile root.crt
    1. updated 2023-04-20 command line – openssl pkcs12 -export -out a.pfx -inkey private.key -in domainkey.crt -certfile cacertfiles.ca-bundle
    2. recently re-issued cert from namecheap and received ca (intermediate/root) cert files in a file with .ca-bundle extension
  6. this did the trick to get the .pfx file.
  7. openssl asked for password to protect the pfx file

Purchasing a SSL certificate for nodejs rest api server

Published August 20, 2014 5:20 pm

I had written about this here when I purchased last time a SSL certificate from godaddy and did not renew it. With the expired certificate, client does not connect to the production server. Hence, I have to look into and purchase a new certificate today.

I found namecheap.com to provide competitive pricing. I could get 1 year certificate for USD 9. Without further analysis, I went ahead and purchased it from them. Few notes below:

  1. I used paypal account to pay instead of directing giving them my credit card details.
  2. Activating the SSL certificate is a separate process than purchasing it. It has to be done after purchase is completed.
  3. I had purchased COMODO positivessl domain certificate
  4. paypal let me pay in INR currency on visa card. It cost INR 570.

Steps for activation of the SSL certificate on namecheap.com

  1. login
  2. menu->manage SSL certificates
  3. click activate link on the dashboard
  4. prior to (3) – I have to have CSR (certificate signing request) ready.  Refer below for my steps with bluehost. You may have to use your webhost or own server like IIS admin to get a CSR which in turn requires a private key generation.
  5. paste the CSR text into the wizard
  6. select the approver email id. I had created an email admin@domainname.com and selected that option.
  7. It gave some error saying — server details could not be verified for the approver email. do you want to continue? — I opted to continue.
  8. submit on next page
  9. After submit – the SSL certificate process kicks off and status on the namecheap.com dashboard keeps getting updated. be patient.
  10. on approver email id – u receive an email and need to click the link for verification.
  11. after few minutes – u receive on your registered email (with namecheap.com) – your SSL as a .zip attachment.

Steps for generating CSR on bluehost

  1. on control panel, search cert – you will find security-> SSL/TLS manager
  2. follow generate key link.
  3. I used 2048 bit and a friendly name – to identify the key later.  generate the key.
  4. follow generate CSR link using the key generated earlier. fill all the fields in the form; they are self explanatory.
  5. finally – it gives CSR as encoded text.

Connecting your domain hosted mail @ bluehost to your gmail account

Published December 2, 2013 6:38 pm

I have my own domain hosted on bluehost. I have not created personalized email address under our domain – thinking it will be tedious to manage another set of email accounts e.g. feedback@example.com or info@example.com and add to daily maintenance tasks. I have simply created an address on gmail and added forward rule to fwd the mails to my personal account @ gmail.

Few days back, I came to know from one of my friend that gmail allows to add “other” email accounts under your hosted domain like mentioned above, to your gmail account. That way you can manage multiple of your accounts – from one single dashboard – your personal gmail account. Today I decided to look into this and finished in order of 2 hours. In my case, the domain is hosted on bluehost.

bluehost itself give the sequences of steps. These steps are good and can be followed. In addition, following notes might help:

  1. Under settings in your gmail, you will find ‘accounts’ tab.
  2. For correct bluehost pop3/smtp server & port settings – refer here. I have used SSL settings for incoming pop3 and outgoing smtp.
  3. Update: I recently found that the above link is now broken. mail settings that works for me: incoming: mail.example.com, port 995, ssl; outgoing: mail.example.com, port 465, ssl; need  to replace your domain name in place of “example.com”
  4. Ensure that username is including the domain name; that is abc@example.com instead of just ‘abc’
  5. If correct settings are not used – you will get error “Server denied POP3 access for the given username and password”.
  6. I have checked ‘leave a copy of the retrieved message at the server’ for the time being. If left unchecked, message will be deleted from your webhost mailbox after retrieval.
  7. I have also checked ‘Label incoming messages’ options so that I can see all message from other account in one folder.
  8. Your gmail verification message might land up in your gmail account while you are checking in your hoster web mail client.
  9. Lastly – I wanted to ensure replying from my account @ mydomain.com for these messages. For this, steps from gmail help were useful.

It is also interesting to note that google provided google apps free edition for custom domain until dec 2012. Now, it costs USD 5 per user/month.

Addon domain is redirected to a folder under primary domain on bluehost

Published August 1, 2013 11:44 am

I had purchased the blue hosting couple of months back and had plan to host multiple site under the hosting plan. Recently, I bought another domain and tried to host it under the same hosting account.

bluehost cpl hand holds to assign the addon domain. but after doing everything, visit to website-2 was getting redirected to the primary domain like this. That is www.website2.com was getting redirected to www.website1.com/website2. After going through bunch of articles, that included this at bluehost forum, I could not find a solution to this. At one point, I even thought whether to just purchase another hosting plan for website-2.

Since few mentions in the thread above – pointed towards issue with htaccess, I started reading about url rewrite and htaccess documention at apache website. The documentation was helpful. After few trial and errors – I found that the few rules added earlier for redirecting root domain (of website1) to it’s www subdomain – was the root cause for this. They were like this:

 

 
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.example.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301]

After removing these two rules, this issue got resolved. There was one more hitch – browser cache kept the browser getting redirected even after this fix. Hence, I have to try it another browser to see that it was working.

With that, I got the addon domain working along with primary domain – using the same blue hosting account. Did you face the same issue?