Website Hosting & SSL certificate installation
Website Hosting
Login to Go Daddy account (https://dcc.godaddy.com/manage/apoyar.eu/dns) with corresponding domain
Create DNS record
• Type – A
• Host – Project Name (websitetesting)
• Point to – Server IP (On which, we are hosting website ex. demo.apoyar)
• Click on SAVE
Login to Server (ex. demo.apoyar)
Go to below path and copy the config file from existing project config file
• Cd /etc/nginx/sites-available
Open config file and edit the servername (ex. demo.apoyar) and path (/var/www/websitetesting)
• Vi websitetesting.conf
Go to below path and create folder (websitetesting) and create index.html file inside that folder with some content
• mkdir websitetesting
• vi index.html
Create softlink with below command
• ln –s /etc/nginx/sites-available/websitetesting.conf /etc/nginx/sites-enabled
Reload nginx service with below command
• service nginx reload
SSL Certificate Installation
Go to https://certbot.eff.org We have to select there, web server and corresponding system Ex. Nginx (webserver) and Ubuntu 18.04 (system)
Install the certificate with below command • sudo certbot –nginx
It will give you a list of projects, to select your project, enter according project number and press enter
Then it will ask for redirection with two options, we have to select 2nd option • Redirect all This way the certificate get installed Then check the website with secured one
With other option we can just generate certificate with below command, then we have to change only key file path in config file • sudo certbot certonly --nginx