How to Install the Latest Version of Nginx on Ubuntu Bionic maintains a repository for Ubuntu. We can use this repository to install the latest version of Nginx. First off, let’s create a repository source file for Nginx with the following command. 1 vim /etc/apt/sources.list.d/nginx.list Paste in the following two lines to the file: deb [arch=amd64] bionic nginx deb-src bionic nginx In order to verify the integrity of packages downloaded from this repository, we need to import Nginx public key using the commands below.

How to Build a CI/CD Pipeline on CircleCI

Once you got your account on CircleCI and setup your project linked to your git repository, you will have to have a directory named “.circleci” inside the root of your project repo. Create a file named “config.yml” in there. Grab the sample script given by CircleCI platform according to your project type. The first step is to get the building workflow success. The next step is to get the deployment workflow success.

How to Configure a Nginx Reverse Proxy With Let's Encrypt

Let’s say one of your micro services is running on http://localhost:3000 If you already have a nginx service running on the server, create a server block like this: 1 vim /etc/nginx/sites-available/ Grab this content to paste in: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 server { server_name; root /var/www/html; index index.html; location / { proxy_pass http://localhost:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } } For more advanced (more so production ready) configuration, use below instead:

How to Use Git Rebase in a Practical Situation

Let’s say there are two pull requests open on a project repository. Each change has its own branch like this: master feature/add-base64-endpoint feature/add-user-agent-endpoint The challenge is to use git rebase to add both changes to master. When you finished, your master branch should have three commits in the following order: feat: add user-agent endpoint feat: add base64 endpoint init Okay, let’s go! 1 2 3 4 5 6 7 8 9 10 git clone repo_url git status git checkout feature/add-base64-endpoint git rebase master git status git checkout master git merge feature/add-base64-endpoint git status git checkout feature/add-user-agent-endpoint git rebase master Oops!

How to Enable Login with Password on Linux

Let’s update the Password Authentication parameter in the ssh service config file: 1 vim /etc/ssh/sshd_config Wait, what? I can’t even find the sshd service? Install it then: 1 2 sudo apt update sudo apt install openssh-server In the /etc/ssh/sshd_config file, uncomment this line: 1 #PasswordAuthentication yes Done. Oops! Don’t forget to reboot! 🙂 Or just run: 1 sudo systemctl restart sshd Happy networking!