Monthly Archives: March 2016

Maintenance CNL1 – Thursday 31th @ 7:00 AM (GMT)

Maintenance CNL1 – Thursday 31th @ 7:00 AM (GMT)

Since the beginning of 2016 UnderHost started to upgrade all our infrastructure, some of our servers dated from 2011.

We upgraded all our US/Canada based hosting, upgraded resources and hardware on all our VPS/Dedicated line with new locations and added Cloud hosting from OnApp.

Now it’s time for some love for our offshore shared servers we will be performing webserver hardware upgrades on all our shared servers in our bulletproof servers in Netherlands.

Your account on CNL1 (If you are on CNL1) will remain with the same nameservers, if you are using third party DNS or CloudFlare directly you need to change your IPs.

Otherwise we are confident that this change will have only minimal effect and unnoticeable effect as we keep both servers online during the transition.

New hardware mean for you better efficiently, newest CPU so even more powerful, fastest RAM so all around an upgrade to the core of your business.

Moving on Latest Dell E3 Servers with 32GB of RAM, Centos 7, Now Including PHP7 as well as all previous PHP version with still our powerful nGinx setup, dedicated off-site backup daily and PHP configuration on the fly via cPanel.

*****************************************

Maintenance has been completed

If you have any questions please reach us via your customerpanel!

Client Area: CustomerPanel

thankyou

Free SSL How to Install Let’s Encrypt on cPanel

Free SSL How to Install Let’s Encrypt on cPanel – Centos Servers

Anyone who has gone through the trouble of setting up a secure website knows what a hassle getting and maintaining a certificate can be. Let’s Encrypt automates away the pain and lets site operators turn on and manage HTTPS with simple commands, Free SSL with a simple commands.

No validation emails, no complicated configuration editing, no expired certificates breaking your website. And of course, because Let’s Encrypt provides certificates for free, no need to arrange payment.

LetsEncrypt is in public beta and already in high demand. This service is a new certificate authority that allows you to generate your own signed certificates in an effort to improve security.  At present there is a feature request for providing this functionality in cPanel.

Unfortunately cPanel does not currently have a plugin or automatic means of installing SSL from Let’s Encrypt. There is a feature request here for this functionality so it is possible this may be brought to the product in the future.

The following will show you how to install the Let’s Encrypt client and how to generate and install SSL certificates from Lets Encrypt via the WHM API.

Installing the Let’s Encrypt Client on CentOS 6.x
Please note: The Let’s Encrypt client requires / prefers python 2.7, so we will install Python 2.7 alongside Python 2.6. Don’t worry it won’t break anything.

rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
rpm -ivh https://rhel6.iuscommunity.org/ius-release.rpm
yum -y install git python27 python27-devel python27-pip python27-setuptools python27-virtualenv --enablerepo=ius
cd /root
git clone https://github.com/letsencrypt/letsencrypt
cd /root/letsencrypt
sed -i "s|--python python2|--python python2.7|" letsencrypt-auto
./letsencrypt-auto --verbose

Installing the Let’s Encrypt Client on CentOS 7.x

yum -y install git
cd /root
git clone https://github.com/letsencrypt/letsencrypt
cd /root/letsencrypt
./letsencrypt-auto --verbose

Generate an SSL
You will be required to enter your email and accept their license agreement. I would recommend using the server admins email. Also make sure you replace “cPanelUser” with your actual username. This is require to allow the Let’s Encrypt client to create the auth files for the domain and be able to access them during the authorization. Please note if you are installing a subdomain or addon domain that points to another path, that you set the path of the subdomain or addon domain.

cd /root/letsencrypt
./letsencrypt-auto --text --agree-tos --email email@domain.com certonly --renew-by-default --webroot --webroot-path /home/cPanelUser/public_html/ -d domain.com -d www.domain.com

For all subsequent runs use the following below, as there is no need to re-provide your email or re-agree to the TOS.
cd /root/.local/share/letsencrypt/bin/
./letsencrypt --text certonly --renew-by-default --webroot --webroot-path /home/cPanelUser/public_html/ -d domain.com -d www.domain.com

By adding the renew-by-default command you can add this to a cron to run every 60 (recommended) or say 85 days to avoid this expiring before you are sure the new certs are retrieved. Then all you need to do is simply run the install script below again to install the updated certificate to cPanel.

0 0 */60 * * /root/.local/share/letsencrypt/bin/letsencrypt --text certonly --renew-by-default --webroot --webroot-path /home/cPanelUser/public_html/ -d domain.com -d www.domain.com; /root/installssl.pl domain.com

You can also generate an FREE SSL certificate via Get HTTPS for free!, there are additional steps that are required however. 

Script to automatically install the SSLs you generated
This script will be used to install the SSL's you generated to cPanel/WHM via the API. Please note the following things.

1. You must replace "rootpass" with your actual root password.
2. The CA Bundle is not by default in the location below and is generally saved to /etc/letsencrypt/live/domain.com/fullchain.pm and is the second cert in the file. I have included the CA Bundle below the script so you can create this.

#!/usr/local/cpanel/3rdparty/bin/perl

use strict;
use LWP::UserAgent;
use LWP::Protocol::https;
use MIME::Base64;
use IO::Socket::SSL;
use URI::Escape;

my $user = "root";
my $pass = "rootpass";

my $auth = "Basic " . MIME::Base64::encode( $user . ":" . $pass );

my $ua = LWP::UserAgent->new(
    ssl_opts   => { verify_hostname => 0, SSL_verify_mode => 'SSL_VERIFY_NONE', SSL_use_cert => 0 },
);

my $dom = $ARGV[0];

my $certfile = "/etc/letsencrypt/live/$dom/cert.pem";
my $keyfile = "/etc/letsencrypt/live/$dom/privkey.pem";
my $cafile =  "/etc/letsencrypt/live/bundle.txt";

my $certdata;
my $keydata;
my $cadata;

open(my $certfh, '<', $certfile) or die "cannot open file $certfile";
    {
        local $/;
        $certdata = <$certfh>;
    }
    close($certfh);

open(my $keyfh, '<', $keyfile) or die "cannot open file $keyfile";
    {
        local $/;
        $keydata = <$keyfh>;
    }
    close($keyfh);

open(my $cafh, '<', $cafile) or die "cannot open file $cafile";
    {
        local $/;
        $cadata = <$cafh>;
    }
    close($cafh);

my $cert = uri_escape($certdata);
my $key = uri_escape($keydata);
my $ca = uri_escape($cadata);

my $request = HTTP::Request->new( POST => "https://127.0.0.1:2087/json-api/installssl?api.version=1&domain=$dom&crt=$cert&key=$key&cab=$ca" );
$request->header( Authorization => $auth );
my $response = $ua->request($request);
print $response->content;
Add the Let's Encrypt CA Bundle
Since Let's Encrypt doesn't added the CA Bundle separately you need to create this file for the above script to work.
Code:
vi /etc/letsencrypt/live/bundle.txt
When editing that file set the following below and save
Code:
-----BEGIN CERTIFICATE-----
MIIEqDCCA5CgAwIBAgIRAJgT9HUT5XULQ+dDHpceRL0wDQYJKoZIhvcNAQELBQAw
PzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMRcwFQYDVQQD
Ew5EU1QgUm9vdCBDQSBYMzAeFw0xNTEwMTkyMjMzMzZaFw0yMDEwMTkyMjMzMzZa
MEoxCzAJBgNVBAYTA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+MJiZZQsY14cCoBG1hd
v0J20/FyWo5ppnfjL78S2k4s2GLRJ7iD9ZDKErndvbNFGcsW+9kKK/TnY21hp4Dd
ITv8S9ZYQ7oaoqs7HwhEMY9sibED4aXw09xrJZTC9zK1uIfW6t5dHQjuOWv+HHoW
ZnupyxpsEUlEaFb+/SCI4KCSBdAsYxAcsHYI5xxEI4LutHp6s3OT2FuO90WfdsIk
6q78OMSdn875bNjdBYAqxUp2/LEIHfDBkLoQz0hFJmwAbYahqKaLn73PAAm1X2kj
f1w8DdnkabOLGeOVcj9LQ+s67vBykx4anTjURkbqZslUEUsn2k5xeua2zUk=
-----END CERTIFICATE-----
Running the script
First make the script executable. Then run the script with the main domain of the certificate generated from Let's Encrypt.
Code:
chmod +x installssl.pl
./installssl.pl domain.com

There you go you are all set and ready to generate and install SSLs from Let’s Encrypt automatically via the command line.

All our shared hosting now offers Free SSL from let’s encrypt get started today!

Hong Kong Servers our new machine in asia just arrived!

Our new Hong Kong Servers

UnderHost and his partners has made significant investments in setting up a secure data center with the industry’s best hardware and software infrastructure, which guarantees high standards and efficiency for your hong kong based servers.

We connects your Business to Mainland China, via Hong Kong, with the very best quality and speed.

Our professionals can speak english and are experienced in Server Technology, eBusiness, and Web Hosting.

Reasons for choosing Hong Kong as your Global Business IT base

  • Open Market Bound to Laws
  • Nearest to your location of business
  • Professional English Speaking Sales & Support Teams
  • Respects of Privacy and Business Data
  • Fast Connection to mainland China, Eastern Asia and Global Network

Hong Kong Servers

Hong Kong Servers

Hong Kong Servers

Data Center Specification
  • TIA-942 Tier 3+ Facilities
  • FM200 and HSSD
  • CRAC System
  • Diesel Power Generator
  • N+1 full load UPS
  • Carrier Neutral
  • ISO/IEC 27001:2005
  • 7x24x265 CCTV
Network Specification
  • Cisco Powered Network
  • IP BGP4 & BGP6
  • Redundancy Network
  • 10/100/1000Mbps Switch Ports
  • Multi-Homing/Carriers
  • Cisco HSRP Support
  • Connectivity Failover
  • Integrated IPMI 2.0 IP-vKVM

UnderHost has our own IP addresses from APNIC, our own international bandwidth supported by multi-upstreams, own Dedicated Servers Dell, own Data Center Rack Space Colocation and 24×7 professional technical support.

UnderHost Hong Kong data center can also provide Server Colocation, BGP peering, GRE Tunnel, DDoS protection & mitigation, CDN, MS Microsoft Exchange 2010,  APNIC account application, more than 5 international bandwidth carriers referral at an attractive price and a variety of custom-made services for particular requirement.

Tier 3 Data Center and Premium Bandwidth to Mainland China are the best environment in Asia for Enterprise Resources Planning (ERP – SAP, Yonyou, Kingdee), Customer Resources Management (CRM), Hosting Control Panel (cPanel), Virtualization (VMware, Citrix XenServer),  Financial systems (Online trading system, stock trading, Forex Trading, Metatrader, Meta Quotes, MT4, MT5), MS Exchange Mail Server (Microsoft Exchange 2010 Mail Server).

In fact we offers offshore optimized solution with the best quality at competitive pricing with problem free so we are here for a long term business with you!

More details

WordPress Password Reset, The Easiest Way!

WordPress Password Reset, The Easiest way to reset admin password

Did you forget your wordpress admin password? Don’t panic!

If you have ever lost or forgot your password to access the WordPress dashboard, it can be very frustrating. Luckily WordPress provides quite a few options for changing or resetting your WordPress password.

We realize that there’s plenty of tutorials online to reset your admin password but they are all complicated and require a lot of command line ssh experience. In just a few steps you can reset your admin password right through cPanel in less than 2 minutes.

  1. Login into cPanel, Under the Database Section, Click on PHPMyAdmin
  2. Select the database of your WordPress (if you are unsure which database please have a look on your wp-config.php files)
  3. Select the ‘wp_users’ table
  4. Click Edit (pencil icon) next to the line that says ‘admin’
  5. In the user_pass field, paste your password by pressing Ctrl – V. From the drop-down, select MD5.
  6. Click Go at the bottom to save it and you’re done!

Now try to login to your WordPress with the new password and Voila!

Using the Emergency Password Reset Script

If other solutions did not work, then you may wish to try using the Emergency Password Reset Script. It is not a plugin but rather a PHP script.

Important Notes

  • Using this script requires you know the admin username.
  • The script updates the admin password and sends an email to the admin’s email address.
  • If you do not get the email sent, the password is still changed.
  • The script is to be placed at the root of your WordPress installation.
  • Removing the script when finished is extremely important for security reasons.

Script is Here!

Happy WordPress, If you need help with WordPress don’t hesitate to Contact our support and If you are looking for WordPress Hosting here you go!

If you wish to reset password via SSH