Securing access to your web applications is essential, and one of the simplest methods to do so is by using HTTP authentication. NGINX, a popular web server and reverse proxy server, provides an easy way to enable HTTP authentication using the Basic authentication scheme. This article will walk you through the process of implementing HTTP Basic authentication on NGINX in a step-by-step manner. HTTP Basic authentication is a simple authentication method that requires a user to provide a username and password to access the protected resources. The credentials are sent as a base64-encoded string in the HTTP header. While this…
Author: Rahul
This tutorial will help you to prevent SQL inject in PHP. In this tutorial first, check a basic example of SQL injection process. How can users steal data from your website using SQL injection? This tutorial also includes methods to prevent SQL injection using PHP-MySQLi and PHP-PDO drivers. Simple SQL Injection Example For example, A have a website for Bank. You have provided a web interface to bank customers to view their account number and balance. Your Bank website uses URL like http://example.com/get_account_details.php?account_id=102 to fetch details from the database. For example get_account_details.php have code something like below.
1 2 | $accountId = $_GET['account_id']; $query = "SELECT accountNumber, balance FROM accounts WHERE accountId = $accountId"; |
Customers accountId…
The Python os.path module is used for the file or directory pathename’s manipulations. The method isfile() of this module is used to check if any file is available or not. Similarly exists() function returns true for files and directory exists. This tutorial includes: Check if file exists in Python Check if file is readable in Python Create directory if not exists in Python 1. Check if file exists For example, To test how isfile() and exists() functions work. Create a TestFile.py file using following content and execute it python. isfile() – function check if given input file exists and is…
How to upgrade to Ubuntu 17.04 from Ubuntu 16.10. Ubuntu 17.04 (Zesty Zapus) is a non LTS release. We don’t recommend users with production systems to upgrade this. The programmers or personal desktop users can upgrade to this release and enjoy its features. This tutorial will help you to Upgrade to Ubuntu 17.04 in easy way. Find details about Ubuntu 17.04 release date and features. Prerequisites This tutorial assumes that you have a running Ubuntu 16.10 system. Also, assumes you have shell access of system with sudo privileges. Step 1. Perform Backups We strongly recommended to backup all your important…
Managing updates on your Ubuntu system is important to keep everything running smoothly. Sometimes, you might want to keep certain software packages at their current versions and not let them update. This is called excluding packages from upgrades. In this guide, we will show you how to stop specific packages from being updated using the apt-get upgrade command. Even if you are new to Ubuntu or computers in general, don’t worry! We will explain everything in easy steps so you can follow along. By the end, you’ll know how to keep certain packages from updating, which can help keep your…
Visual Studio Code is a lightweight source code editor for JavaScript, TypeScript and Node.js Applications. It also has extensions for multiple other programming languages like C++, C#, Python, PHP, Go, etc. This tutorial will help you to install Visual Studio Code on OpenSUSE and SUSE Linux Enterprise operating system. How to Install Visual Studio Code Editor in Ubuntu & Debian How to Install Visual Studio Code Editor in Fedora & CentOS Note: Visual Studio Code is Different that Visual Studio IDE Step #1. Enable Package Repository Create a new file /etc/yum.repos.d/vscode.repo and edit in text editor. sudo vim /etc/yum.repos.d/vscode.repo Now…
Visual Studio Code (not Visual Studio IDE) is a lightweight source code editor for JavaScript, TypeScript, and Node.js Applications. It also has extensions for multiple other programming languages like C++, C#, Python, PHP, Go, etc. This tutorial will help you to install Visual Studio Code on CentOS, RHEL, Fedora, and its derivatives systems. Remember that Visual Studio Code is a different application than Microsoft Visual Studio IDE. How to Install Visual Studio Code Editor in Ubuntu & Debian How to Install Visual Studio Code Editor in SEL & openSUSE Step 1 – Enable Yum Repository Visual Studio Code provides an…
Visual Studio Code is a lightweight source code editor for JavaScript, TypeScript and Node.js Applications. It also has extensions for multiple other programming languages like C++, C#, Python, PHP, Go, etc. This tutorial will help you to install Visual Studio Code editor on Ubuntu, Debian, Linuxmint, and its derivatives systems. How to Install Mono Framework on Ubuntu This tutorial covers two methods for install VS Code on Ubuntu, Debian, and Linux Mint systems. How to Install VS Code on Ubuntu using Snap The Visual Studio Code is officially distributed as a Snap package in the Snap Store. Also, most of…
During the full update or automatic packages upgrade process, sometimes packages are upgraded which is not required. Sometimes this causes serious issues on the server. For example, You need to exclude kernel, PHP, MySQL and Apache packages from getting updated while updating the system via yum. This tutorial will help you find the answer of how to exclude packages from the yum update? How to use exclude option with yum? How to prevent packages from auto update via yum? How to exclude only 32-bit or 64-bit packages? How To Exclude Packages from Apt-Get Upgrade 1. Exclude Packages with Command You…
Docker, the de facto standard in containerization, provides an efficient way to package and distribute applications. As a developer or system administrator, there are times when you might need to get shell access to a running Docker container. This could be for debugging purposes, application management, or other various tasks. This guide provides a step-by-step process on how to gain shell access to your running Docker containers. Prerequisites Before we delve into the process, ensure that you have Docker installed and running on your machine. This guide assumes you have a basic understanding of Docker concepts such as images, containers,…