Apache is one of the most popular open-source web servers available, used by many websites globally. One of its features is the ability to list directories and their contents when there’s no index file present. This feature, while handy for some uses, can expose sensitive information about your website’s structure or content to the public. In this article, we will walk you through how to disable directory listing in Apache to enhance your website’s security. What is Directory Listing? Before we delve into disabling directory listing, it’s crucial to understand what it is. Directory listing is a feature that allows…
Author: Rahul
In the era of cloud computing, having your own private cloud storage is not just a luxury but a necessity for many. ownCloud offers a flexible, open-source solution for file sharing and data synchronization. In this guide, we’ll walk you through the process of installing ownCloud on Fedora Linux, a popular and powerful Linux distribution. Prerequisites Before we start, ensure you have the following: A system running Fedora Linux. Basic knowledge of Linux command line. Sudo or root privileges on your system. Step 1: System Update First, update your Fedora system to ensure all packages are up to date. Open…
Webmin is a web hosting control panel like CPanel which provides easy to use interface for managing Unix-like systems. Webmin is very easy to use and a lightweight application can be easily installed on the system within a minute. Webmin removed all the manual tasks to be done through command lines. This article will help you to install the latest Webmin on Ubuntu 19.10, 18.04 & 16.04 LTS systems. This article is using APT to install Webmin, you may also download Webmin packages directly and install in system. Step 1 – Configure APT Repository To install or update Webmin in…
Some times you may require to convert any string to uppercase (all letters). This tutorial will help to convert a string (any case) to the upper case as showing in the below image. Convert String to Upper Case Using Python programming language you can use string .upper() function to convert any string to upper case. Here is the sample Python code to convert string to uppercase.
1 2 3 4 | >>> s = "Hello Python" >>> print(s.upper()) HELLO PYTHON |
Suggested reading Some more examples of string conversions in Python. Convert String to Lowercase in Python
Question – How do I sort du -h command output by there sizes? In the GNU Coreutils >= 7.5 package, sort command provides -h parameter allows to compare human-readable numbers (e.g., 10K 15M 1G etc). This helps up to compare the results of `du -h` and short them. du -h * | sort -h The above will show the results in the ascending order by size. You can reverse this using -r to show results in descending order. du -h * | sort -rh 15M btmp.1 7.2M apache2 2.2M auth.log.1 1.9M btmp 1.5M auth.log 1.3M redis 656K letsencrypt 468K auth.log.4.gz…
Laravel, a popular PHP framework for web application development, has a strong focus on security. Among the many security considerations in Laravel, properly setting up file permissions is crucial. Without the right permissions, your application may be vulnerable to attacks, or it could malfunction due to lack of necessary access. In this tutorial, we’ll walk you through the steps for correctly setting up file permissions in Laravel. Understanding File Permissions Before diving into the steps, it’s essential to understand what file permissions are. Every file and directory in your Laravel application has associated permissions that dictate who can read, write,…
Use rm -r switch with the git command to remove directory recursively. After removing the directory you need to commit changes to the local git repository. Then push the changes to remove the directory from the remote git repository. Use the command line below to remove the directory named test_dir from the current directory. git rm -r test_dir Then commit and push to apply changes in the local and remote repository. git commit -m “Removed test directory” git push origin master # Change ‘master’ with your branch name All done, The test_dir has been removed from the local as well…
Setting the proper file permission for any web application is an important part of web hosting. In this tutorial, you will learn how to change file permissions on folder and sub-folders recursively in a single command. As you know, In Linux everything is treated as a file. A folder is also known as directory file denoted by ‘d’ in the permission section. The below command will set the owner to www-data and group-owner to ubuntu for all files and directories and subdirectories. sudo chown -R www-data:ubuntu /var/www/html Use the chmod command to change the permissions for all files, directories, and…
This tutorial will help you to install Dovecot on Ubuntu systems. Dovecot package provides service for POP/IMAP protocols. With these protocols, you can access emails accounts from remote clients. Step 1 – Install Dovecot on Ubuntu Dovecot packages are available under default Ubuntu repositories. You can install Dovecot on Ubuntu by running a single command. Open a terminal and execute below command: sudo apt install dovecot Step 2 – Configure Dovecot Dovecot is a service used for providing POP/POP3s and IMAP/IMAPs protocols. POP/IMAP protocols are used for fetching emails from email accounts. Edit dovecot configuration file and search for below…
An array is a container of multiple values of similar types. After initializing an array, how can you empty it? This tutorial will help you to empty an Array in JavaScript language. Empty Array in JavaScript Use the following syntax to empty an Array. Here myArray is the name of Array. myArray = []; The above code will create an Array named myArray with no content. If the myArray already exists, will lose all the existing elements. You can also set the length to 0 to make it empty. myArray.length = 0