How To Exit Vim Text Editor Command ?
This article will guide you on how to exit #vim text editor using various options. 1. Open a new or existing file with vim filename . 2. Type i to switch into insert mode so that you can start editing the file. 3. Enter or modify the text with your file. 4. Once you're done, press the escape key Esc to get out of insert mode and back to #command mode. 5. Type :wq to save and exit your file.
Steps to Install and Configure Nginx on Ubuntu Linux 18.04 LTS?
This tutorial will guide you on how to get Nginx server installed and configured on an Ubuntu Linux 18.04 LTS server.
Nginx is one of the most popular web servers in the world and is responsible for hosting some of the largest and highest-traffic sites on the internet. It is more resource-friendly than Apache in most cases and can be used as a web server or reverse proxy.
Nginx Configuration Files Structure
- All configuration files are located in the /etc/nginx/ directory.
- Nginx main configuration file is at /etc/nginx/nginx.conf.
- It's best practice to create a separate configuration file of each domain for better maintainability.
- New server blocks (configuration file) of each domain should be stored in /etc/nginx/sites-availabledirectory. You need to make symlink of these configuration files at /etc/nginx/sites-enabled to take in used by Nginx.
- Activating server blocks is done by creating a symlink (a pointer) from the configuration file sites in a /etc/nginx/sites-enabled directory to the sites-enabled directory.
- The default server web root directory is /var/www/html
- It's best practice to to follow standard naming convention. Nginx server block files name should as domain name and must end with .conf extension. For example, your domain name is example.com then server block file name should example.com.conf
- Nginx log files (access.log and error.log) are located in the /var/log/nginx/ directory. It's also recommended to have a different access and error log files for each server block.
How to rename a directory in Linux using the CLI?
This article will guide you on the process to rename a directory in Linux using the mv command.
How to generate SSH Keys in Linux?
This article will help you to create and generate ssh keys using the ssh-keygen command.
How To Run a Script In Linux?
This tutorial will guide you on how to write a simple shell script and run a script in Linux operating system with help of chmod and other commands.
How to perform Linux / Unix Rsync Copy for Hidden Dot Files and Directories Only?
This article will guide you on how to to use the rsync command to copy hidden dot files including directories.