Part 3: Build an eCommerce Site Using PrestaShop Framework
Dear my friend who doesn’t want their website to have SSL Certificates, right? Therefore, in this tutorial, 1Byte will guide you to install the free SSL Certificate on your site
Here is your road map:
- Step 1: Install the PrestaShop framework, and necessary packages, and set up customizations on the BackEnd side of the Server. You’ve done this in Part 1
- Step 2: Based on the components in step 1, install PrestaShop site through your browser. You’ve done this in Part 2
- Step 3: Install SSL Certificate on your website. You are here, Part 3!!!
- Step 4: Customize the interface and manage PrestaShop to your liking ^^
Prerequisites
To be able to finish Step 3, you need to read through and finished both Part 1 and Part 2. This is a must and you have to have the following components:
1) Domain Name
2) Cloud Hosting or Cloud Server
3) PrestaShop framework is already installed both on your Server & browser
4) A spirit of eagerness to learn new things
Let’s Do It
Step 1: Login into your Server via terminal
ssh root@<your-server-IP>
Step 2: Configure firewall-cmd to accept https service
sudo firewall-cmd --zone=public --permanent --add-service=https
sudo firewall-cmd --reload
sudo firewall-cmd --list-services
Step 3: Install the Certbot Let’s Encrypt
sudo yum install epel-release -y
sudo yum install certbot python2-certbot-apache mod_ssl -y
Step 4: Point your domain to this Cloud Server/ Cloud Hosting
NOTE:
You need to have a domain name. This is a MUST. If you don’t have a domain name, you can’t continue this tutorial 😂. We would really appreciate it if you purchased on 1Byte’s Website
Do you know what your server’s IP address is? This is also a must, and there are several methods to figure out:
- Method 1: You can check your email to get this information
- Method 2: You can go to User Dashboard, choose the Cloud Server or Cloud Hosting section, and get its IP
- Method 3: Check directly on the terminal with ifconfig command
END OF NOTTING:
Ok, back to the main point. Here, I will guide you to point your domain to Cloud Server/Cloud Hosting on 1Byte platform + If you use a 3rd party domain, you have to do it yourself because each provider will have a different way of pointing, and managing domains→ 1Byte encourages you to buy our domains. Why? Because following to the instructions step-by-step guarantees success 100%.
4.1 – Login into your User Dashboard, navigate to the Domain section, and choose the domain that you want to use
4.2 – Navigate to DNS Management and do as shown below
NOTE:
- If your domain is completely new → This process only takes 5-15 minutes
- If your previous domain has been used, and now you transfer this domain to a new host
→ This process may take up to 30 minutes. Depends on what was the previous TTL value you used
END OF NOTTING
4.3 – Verify wheter your domain has received the server’s IP address or not?
#Using ping command to verify
ping hobbykh.fun -c4
Step 5: Generate the cert key & install the Let’s Encrypt SSL Certificate
Back to your terminal, and type the command followings:
#Remember to change your domain name in here
sudo certbot --apache -d hobbykh.fun -d www.hobbykh.fun
The program will present you with a step-by-step guide to customize your certificate options. It will ask you to provide an email address for lost key recovery and notices, and then prompt you to agree to the terms of service.
If you did not specify your domains on the command line, you will be prompted for that as well.
If your Virtual Host, which we already done in Part 1 files does not specify the domain they serve explicitly using the ServerName directive, you will be asked to choose the virtual host file. In most cases, the default ssl.conf file will work.
You will also be able to choose between enabling both http and https access or forcing all requests to redirect to https. For better security, it is recommended to choose the option 2: Redirect if you do not have any special need to allow unencrypted connections. Select your choice then hit ENTER.
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel):2
NOTE:
In the special case, your domain has been used for a certain website, and has installed SSL certificates. Then Output from terminal will look like this
Step 6: Navigate to your website and check again
(Ouch…our website has not secured yet @@! What’s wrong???) EXPLAINATION:+ Let’s Encrypt, my dear friend, has already installed the SSL certificate on our website successfully.
If you recall from Part 2, we told PrestaShop not to force to use the SSL certificate in haste since we want to connect to PrestaShop insecurely (http) first, then install the SSL certificate afterwards.+ Now we just need to go back to the Admin Dashboard, and configure PrestaShop to use SSL certificate
Step 7: Configure PrestaShop to only use https (secured protocol)
After Log in to PrestaShop as the administrator, On the left-sidebar menu, in the Configure section, select General option
Currently PrestaShop has not enabled SSL, so when you click on the above link, your browser will warn you. Just click Advanced… then Accept The Risk
At this point, you will be redirected to another PrestaShop page. Just click on “I understand the risk” button
And now you just need to switch to YES at Enable SSL section
Then roll to the bottom of this page, click Save
Don’t wait to celebrate, we still have to configure 1 more element
Same as above, but now select the “Traffic & SEO” option
Navigate to “Set Shop URL“
NOTE:
Don’t put https:// or https://www.
Step 8: Let’s connect to our website again
You can go to Digicert, SSL Shopper, or any website that you know to check. Just type your domain and enjoy the result
Conclusion
To everyone who has come to this point in the roadmap, I say, well done. Set up an SSL Certificate for your website now that PrestaShop is up and running. After that, all that’s left is to polish your website, add your products for sale, tweak your prices, and so on. 1Byte cannot assist you with this; it is your responsibility to do it on your own. Each person’s business concept, product, pricing point, and management style will be distinct from the others. Let 1Byte wish you well on your business and thank you to those of you who have used 1Byte’s services.