The Complete Process of Configuring SSL Certificate for Old Xue's Host

Publish: 2016-11-16 | Modify: 2018-11-22

Introduction

Laoxuehost, founded in 2008, specializes in providing domain registration and cost-effective overseas virtual hosting services. Laoxuehost uses the powerful cPanel panel. With the rapid development of the Internet and the increasing importance of security, using HTTPS for websites has become a trend. Most virtual hosts provided by domestic IDCs do not support SSL certificate configuration, but Laoxuehost does.

1. Hosting Purchase (Advertisement)

If you enjoy tinkering, you can consider VPS, such as "HostUS VPS." If you don't want to tinker too much, then using virtual hosting is undoubtedly a better choice. Laoxuehost purchase address: http://www.laoxuehost.com/, with a 25% discount code: xiaoz25 (for first-time purchases only).

2. Adding Domain and Creating FTP

Enter the cPanel hosting panel -> Addon Domains -> Enter your domain name and create an FTP account, which will be needed later. See the screenshot below.

laoxueyu1

Taking www.xiaoz.top as an example, please replace it with your own domain name in the actual configuration. Please note that the default subdomain is "www," which may cause an error, so it has been changed to "xiaoztop" in the following screenshot.

xiaoztop

3. Domain Resolution

On the right side of the cPanel panel, there is server information. Get the IP address of the server for the resolution. Then add domain resolution at the domain registrar. See the screenshot below.

gongxiangip

domainjiexi

4. Apply for SSL Certificate

Please refer to "Free Application for Alibaba Cloud DV SSL Certificate" and download the certificate for Apache in the Alibaba Cloud console.

forapache

We will see four files in the compressed package. Among them, ".key," "public.pem," and "chain.pem" are what we need. See the screenshot below.

apachessl

5. Configure SSL Certificate

In the cPanel panel -> Security -> SSL/TLS, enter management, select the previously created www.xiaoz.top as the domain. In the "Certificate: (CRT)" field, enter the contents of "public.pem." In the "Private Key: (KEY)" field, enter the contents of ".key." In the "Certificate Authority Bundle: (CABUNDLE)" field, enter the contents of "chain.pem." All three are required. Finally, install the certificate.

2016-11-16_111026

2016-11-16_112925

6. Access Testing

Finally, visit https://www.xiaoz.top/ and a small green lock icon will appear, indicating that everything is going smoothly. At this point, the SSL configuration for Laoxuehost is complete.

xiaoztopssl

7. 301 Redirection

If you want HTTP (port 80) to automatically redirect to HTTPS (port 443), edit the ".htaccess" file in your website directory and add the following redirection rules at the appropriate location. If there is no ".htaccess" file, create one locally and upload it with the content below.

RewriteEngine on
RewriteBase /
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R=301]

301test

CURL Capture Test

8. Conclusion

Laoxuehost does not require filing, and virtual hosting supports SSL configuration. Users who do not want to tinker too much can give it a try. If you have previously purchased Laoxuehost and have bound a domain name, please start with step 4 to apply for an SSL certificate.


Comments