Part 3: Build an ecommerce site using PrestaShop framework
Here is your road map:
- Step 1: Install PrestaShop framework, necessary packages, and set up customizations on the BackEnd side to 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 ^^
1) Domain Name
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
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
sudo yum install epel-release -y sudo yum install certbot python2-certbot-apache mod_ssl -y
- 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:
4.1 – Login into your User Dashboard, navigate to Domain section and choose the domain that you want to use
4.2 – Navigate to DNS Management and do as shown below
4.3 – Verify wheter your domain has received the server’s IP address or not?
#Using ping command to verify ping hobbykh.fun -c4
+ 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 do 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
+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
(Because this domain hobbykh.fun has been used before, so I will choose option 1)
(If you receive a message like the image above, this means you have already installed an SSL Certificate on your website)
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.
Step 7: Configure PrestaShop to only use https (secured protocol)
(You still remember the way to connect to Admin Dashboard right? In my case, I will head to “secret_page”, use my credential to login)
After Log in to PrestaShop as the administrator, On the left-sidebar menu, in the Configure section, select General option