Publish: 2016-11-16 | Modify: 2018-11-22
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.
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).
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.
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.
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.
Please refer to "Free Application for Alibaba Cloud DV SSL Certificate" and download the certificate for Apache in the Alibaba Cloud console.
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.
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.
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.
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]
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.
I come from China and I am a freelancer. I specialize in Linux operations, PHP, Golang, and front-end development. I have developed open-source projects such as Zdir, ImgURL, CCAA, and OneNav.