Secure VPS in Ubuntu 1804 with Letsencrypt Nginx PHP MySQL

Create your virtual private server. Deploy Wordpress, Laravel and all projects you need, with an A+ security rating.
Secure VPS in Ubuntu 1804 with Letsencrypt Nginx PHP MySQL
File Size :
2.35 GB
Total length :
5h 21m



JuanD MeGon


Last update




Secure VPS in Ubuntu 1804 with Letsencrypt Nginx PHP MySQL

What you’ll learn

Publish your projects and services in your own online space securely and autonomously.
Manage your VPS server efficiently and securely in an agile, easy, secure and economical way.
Use the most recent and recommended techniques to manage your services and projects securely on your own VPS server.
Deploy projects online, with high security, quickly and very economically.
Secure connections to your systems and your products, through HTTPS completely free of charge with Letsencrypt.
Master the best practices to ensure all your systems, such as Nginx, MySQL or MariaDB, PHP and similar.
Feel complete confidence in managing your VPS server, without hesitation at any time about what you do.
Install and configure any package you need with the skills learned during the course.

Secure VPS in Ubuntu 1804 with Letsencrypt Nginx PHP MySQL


To be able to make a payment for a VPS that you will use during the course ($5 per month in DigitalOcean, or depending on the provider you choose)
Have your own domain or acquire one. One payment is recommended (.com, .net, or similar)
A desire to learn, participate, and willingness to follow the course, without fail 🙂
It is desirable, basic notions such as opening and closing the console, copy and paste the text of the same (Shell, CMD, PowerShell, iCommand or similar)


NOTE!!! This course already has a new edition using Ubuntu 20.04 and much more content. Search for Secure VPS in Ubuntu 20.04: LetsEncrypt, Cloudflare and moreSo, you want to publish all those projects on your own server, but do not know where to start? Well, this course is what you need :)Create and configure your Virtual Private Server (VPS), with a high-security rating, from scratch and step by step:In this course, you are going to create, configure and deploy your VPS server from scratch, set it correctly, with the adequate security measures and the most recommended mechanisms. Always use secure protocols such as SSH to connect with your VPS and HTTPS to protect your websites and projects. Forget the insecure passwords, so you can establish secure connections with your server with the SSH protocol, without problems and achieve anything you need.Deploy all your projects with your proper domain, with infinite possibilities, at no additional cost. Keep your own space in the cloud for all your jobs, projects and ideas, deploy all types of projects in the same instance and with the number of domains and sub-domains that you want, without having additional costs.In the course, you will deploy four different projects using WordPress and Laravel, each one in a different domain or sub-domain.During the course is recommended to use DigitalOcean, but you are free to create your VPS with the provider you want or need. You can follow the course using any clean instance of Ubuntu 18.04LTS in your selected VPS provider. Everything will be done from scratch and step by step, without relying on additional services.Install and deploy a complete system with Linux/Ubuntu 18.04, PHP, Nginx and MySQL or MariaDB; in addition to obtaining security certificates in an automated way through Letsencrypt, all for free at no extra cost for your systems.Why must you take this course?Because it uses the most recent version of Ubuntu (Ubuntu 18.04) which is a Long Term Support (LTS) version. This version allows you to obtain updates and security patches for at least two years, which means that you can deploy your system in Ubuntu 18.04LTS and you will not have to worry about moving to another version for a long timeBecause there is not another online course which explains every step at this level of detailBecause Letsencrypt is a trend, and you will not find content that teaches you how to use it in the way it is done in this course (the correct and simple way)Because the best standards are used to obtain the highest security rating (A+) in the sites that you ensure following the courseBecause today, the main browsers are demanding secure HTTPS connections in any online site or service, and by following the course, you can secure all your systems for free using Nginx and LetsencryptBecause you will learn to deploy two of the most popular types of projects in PHP, which are WordPress and Laravel sitesWhat will you learn and obtain by following and finishing the course?At the end of this course, you will be able to deploy your VPS server in a very short time and with great ease, using powerful, innovative and safe tools. You will then have your projects online without additional charges, no matter how many domains, sub-domains or projects you put in your VPS, the cost will remain the same.At the end of all classes, you will have all your projects under a completely secure server, with HTTPS/TLS connections completely free through Letsencrypt and with an A+ rating in the secured sites.But… What exactly will you learn?Here you have everything you can get from this course:Create your own VPS server with Digital Ocean or any provider you chooseHave a safe and friendly system with Linux / Ubuntu in its most recent LTS version (Ubuntu 18.04)Deploy an Nginx web server in a few minutes and with the best security settingsDeploy a MySQL or MariaDB database server wholly secure and without delayEasily configure and use Git to deploy the different projects on your VPS via SSHObtain external packages and install them globally (composer and Letsencrypt acme·sh as examples)Create and configure your domain and all sub-domains, without having to pay extraPoint your domain to your VPS server by configuring the DNS entriesConnect to your VPS remotely, quickly and securely using SSH keysManage user accounts and prevent automated and external systems from accessing privileges (root)Learn to use the essential commands (cd, systemctl, cp, sudo, mv, rm, mkdir, reboot, and many more)Learn how to manage VPS packages with apt easilyAssign permissions on folders and files in the correct way withDemand for the use of secure connections with SSH, and forget about insecure passwords for all the usersCreate and handle users correctly with administrative permissions (sudo)Deploy different WordPress and Laravel projects each in a different domain or sub-domainUnderstand and take advantage of the use of SSH to connect to your VPS or external servicesConnect with third party service through SSH keys correctlyEasily configure a firewall (UFW) and dramatically increase the security of your VPSConfigure your services (Nginx, PHP, MySQL / MariaDB, etc.) to make them more secureMitigate DoS and DDoS attacks with proper configuration of the Nginx webserverPrevent automated systems from trying to access your VPS, through Fail2BanSet expiration headers for your projectsEnable the Gzip compression system on your web serverAvoid CSS/XSS attacks with NginxGet security certificates for HTTPS connections for your projects with LetsencryptInstall the security certificates in Nginx correctly, to obtain the A + security ratingUse acme · sh to obtain and automate the installation of Letsencrypt security certificatesCreation and use of domains and all sub-domains that you require easilyHow to quickly deploy any project in your VPSHow to deploy complex projects in the VPS (Laravel as a case of use)And it does not end there! You will have lifetime access to all classes, which includes new future classes and upgrades. You will also have first-hand access to the system of questions, messages, and answers, where I will answer all your questions and comments immediately (I always respond). I will be pleased to help with any problem or doubt you have during the course.Do not wait anymore. To learn all these skills click on “Register” and start feeling the freedom of having your own VPS.I will see you in classes 🙂


Section 1: Welcome to the course

Lecture 1 About the instructor

Lecture 2 What will you do and what will you learn

Lecture 3 Why is a VPS good?

Section 2: Preparation of your system and some tools

Lecture 4 Creating an account with a VPS provider

Lecture 5 [Optional] Create an account in the provider used during the course

Lecture 6 How to Ask Questions

Lecture 7 Enabling Linux commands on Windows with Git and CYGWIN

Lecture 8 Generating SSH keys to access the VPS securely

Section 3: Creation and preparations for the Virtual Private Server (VPS)

Lecture 9 Creating your VPS with Ubuntu 18.04

Lecture 10 Connecting to the VPS via SSH

Lecture 11 Improving the connection flow to the VPS

Lecture 12 Keep active the connection to the server

Lecture 13 Pointing an existing domain to the VPS server

Lecture 14 Pointing the domain to DigitalOcean DNS

Section 4: Using and understanding some essential Ubuntu commands

Lecture 15 How to explore and navigate through system directories

Lecture 16 File management (create, delete, move, copy and display)

Lecture 17 Directory management (create, delete, move, copy and display)

Lecture 18 Tricks to be agile on the command line

Lecture 19 Management and updating of VPS packages with apt

Lecture 20 Manage processes with the systemctl command

Lecture 21 How to restart the server when required

Section 5: Assigning an additional user account to ensure good use of the VPS

Lecture 22 How to manage user accounts in Ubuntu (create and delete)

Lecture 23 How to log in to the VPS with a new user

Lecture 24 Assigning and using administrative permissions in Ubuntu

Section 6: Establishing a security layer on the VPS server

Lecture 25 Preventing login as root on the VPS

Lecture 26 Configuring and using the Ubuntu UFW firewall

Lecture 27 Assigning permissions correctly in Ubuntu

Lecture 28 Using Fail2Ban to prevent intruders in the VPS

Section 7: Installing and configuring Nginx in the VPS

Lecture 29 Installing Nginx in the VPS

Lecture 30 Allowing access to sites served by Nginx

Lecture 31 Where are Nginx and its important files located in the VPS

Lecture 32 How does Nginx to handle the requests

Lecture 33 Setting up the first site in Nginx

Lecture 34 Configuring the subdomains on the VPS with Nginx

Section 8: Installing and configuring MySQL or MariaDB in the VPS

Lecture 35 Installing the MySQL or MariaDB server in the VPS

Lecture 36 How to interact with MySQL or MariaDB from the VPS console

Lecture 37 Ensuring the installation of MySQL or MariaDB in Ubuntu

Lecture 38 Create separated MySQL users for each VPS project

Section 9: Installing and configuring PHP in the VPS

Lecture 39 Installing PHP-FPM (Fast Processing Module) in the VPS

Lecture 40 The important files and locations of PHP in the Ubuntu VPS

Lecture 41 Securing PHP installation of the VPS

Lecture 42 Sending requests from Nginx to PHP-FPM

Section 10: Making Nginx and the VPS sites more safe and efficient

Lecture 43 Preventing access to .htaccess and .git files

Lecture 44 Hiding the Nginx signature in the responses

Lecture 45 Avoiding clickjacking on Nginx sites

Lecture 46 Avoiding MIME confusion attacks in Nginx

Lecture 47 Avoiding XSS attacks on Nginx sites

Lecture 48 Enabling compression in Nginx with Gzip

Lecture 49 Mitigating DoS and DDoS attacks on Nginx

Lecture 50 Preventing Nginx sites from being “hijacked”

Section 11: Installing and configuring useful tools for VPS projects

Lecture 51 Install and configure composer in the VPS

Lecture 52 Preparing the VPS to establish SSH connections with third parties

Lecture 53 Installing additional PHP extensions in the VPS

Section 12: Deploy a WordPress site in the VPS

Lecture 54 Obtaining and preparing the structure of WordPress in the VPS

Lecture 55 Deploying and installing WordPress in the VPS

Section 13: Deploying an existing Laravel project in the VPS

Lecture 56 Getting a Laravel project from GitHub

Lecture 57 Installing the Laravel dependencies with Composer

Lecture 58 Preparing Nginx for the Laravel project

Lecture 59 Deploying and configuring Laravel in the VPS

Section 14: [Exercise] Deploy an existing Laravel project in the VPS

Lecture 60 Get the Laravel project from Github

Lecture 61 Obtain the dependencies of the project with composer

Lecture 62 Set up the assets site for pointing this project

Lecture 63 Deploy and configure the Laravel project

Section 15: [Exercise] Deploy your WordPress site on the VPS

Lecture 64 Get the structure of WordPress

Lecture 65 Deploy and install WordPress on the VPS

Section 16: Using Letsencrypt to establish HTTPS connections on the VPS sites

Lecture 66 About Letsencrypt and as a client

Lecture 67 Installing a Letsencrypt client (

Lecture 68 Meeting the Letsencrypt client and preparing the VPS for it

Lecture 69 Making sure we can always automatically renew our certificates

Lecture 70 Using Letsencrypt to obtain a certificate for each site

Lecture 71 Installing each Letsencrypt certificate in the VPS

Lecture 72 Configuring Nginx sites to use HTTPS

Lecture 73 Resolving an issue with HTTPS and the security headers

Lecture 74 Checking the security of the VPS domains

Section 17: Keep your VPS updated

Lecture 75 Upgrading to PHP 7.3

Lecture 76 Upgrading Nginx

Section 18: Conclusions and recommendations

Lecture 77 Remember to keep your VPS updated

Lecture 78 Apply what you have learned in what you need to do in your VPS

Lecture 79 Try DigitalOcean without having to pay

Who wants to manage their own space on an online VPS server,Who seeks to have the freedom to install and deploy any type of project without having to pay more.,Who longs to deploy as many sites, domains, and sub-domains without having to pay additional.,Who wants to have their own services and projects online safely and economically.,Whoever wants to have total control over their online projects, domains, sub-domains, and latest technologies

Course Information:

Udemy | English | 5h 21m | 2.35 GB
Created by: JuanD MeGon

You Can See More Courses in the IT & Software >> Greetings from

New Courses

Scroll to Top