Configuring Apache virtual hosts on Fedora

Configure Apache VirtualHost on Fedora

Apache web servers utilize the virtual host feature in order to host more than one website. If you have Apache installed on Fedora Linux and want to run multiple websites, this is the route you will have to take. But don’t worry, Apache makes it rather easy to setup and configure virtual hosts.

In this guide, we’ll go through the step by step instructions to configure Apache virtual hosts on Fedora.

In this tutorial you will learn:

  • How to configure Apache virtual hosts on Fedora Linux

Read more

Receiving the 403 Forbidden error when directory content listing is turned off

Turn Off directory browsing on Apache

When installing Apache on a Linux system, the directory content listing is enabled by default. This may be a desirable features in some scenarios, but it’s a potential security hole in others. It’s easy enough to turn this setting on or off for each website (virtual host) that you have set up.

In this guide, we’ll go over the step by step instructions to edit the Apache configuration to hide directory content listing for Apache.

In this tutorial you will learn:

  • How to hide directory content listing in Apache

Read more

apache-logo

How to manage dynamic virtual hosts with Apache and the mod_vhost_alias module

The Apache web server has the ability to serve multiple websites from the same IP address, using virtual hosts. Each Virtual Host can be configured in the main server configuration file, or, thanks to the Include or the IncludeOptional
directives, in its own dedicated one. When the number of virtual hosts increases, their management starts to become troublesome. If their configuration is quite similar, we can manage them dynamically, thanks to the mod_vhost_alias module. In this tutorial we will see how to do it.

In this tutorial you will learn:

  • What is an Apache virtual host
  • How to check if the mod_vhost_alias module is enabled
  • How to load the mod_vhost_alias module on Debian and Red Hat family of distributions
  • How to manage dynamic virtual hosts using the mod_vhost_alias module
apache-logo

Read more

We are prompted for a username and password when trying to access the protected directory

Apache .htaccess directory access protection

When running an Apache web server on a Linux system, there may be some directories that you don’t want everyone in the world to be able to access. Apache gives us a couple of different tools that website administrators can use to protect a directory.

One of the most common ways to configure restricted access to a folder is through the .htaccess file. Doing this configuration will prompt users for a password whenever they come across the protected URL. But we can also configure the same protection without .htaccess.

In this guide, we’ll go over the step by step instructions for protecting a directory on an Apache web server, through two different methods. Follow along with us to get the password protection set up on your own website.

In this tutorial you will learn:

  • How to protect a directory using .htaccess file
  • How to protect a directory without .htaccess file

Read more

WordPress admin menu

WordPress Installation on Ubuntu Linux with Apache and MySQL

WordPress has remained one of the best and easiest ways to get a sleek site up and running ever since its inception in 2003. As a matter of fact, current trends only show its popularity continuing to increase. WordPress is simple to use, and even hosting it yourself isn’t that hard, as we’ll prove to you in this article.

In this guide, we’ll show you how to get your site hosted with WordPress on Ubuntu Linux. We’ll use Apache as our HTTP server, and also install PHP and MariaDB (an open source implementation of MySQL) since WordPress requires them in order to function. This assortment of packages is commonly referred to as a LAMP stack (Linux, Apache, MySQL, PHP). Once those packages are installed, we’ll go over the configuration of Apache and MySQL, including initial setup of a database and user, before installing WordPress itself. Towards the end, we’ll also show you how to configure a self signed SSL certificate, or get a free one from Let’s Encrypt, which enables your site to utilize HTTPS.

In this tutorial you will learn:

  • How to install and configure Apache
  • How to install and configure MariaDB for MySQL
  • How to setup a MySQL user and database for WordPress
  • How to download and install WordPress
  • How to configure a self signed SSL certificate for your WordPress site
  • How to configure a free SSL certificate from Let’s Encrypt

Read more

Installing Concrete5 CMS on Fedora Linux

Installation of Concrete5 CMS on Fedora Linux

Concrete5 is a CMS (content management system) which allows users to edit any page via editing toolbar and change its content or design without reading complicated manuals or navigating a complex administration back-end.

In this article, we’ll go over the step by step to install Concrete5 CMS on Fedora Linux. This will include setting up Apache as an HTTP server, various PHP modules, and MariaDB to host the database.

In this tutorial you will learn:

  • How to install prerequisite packages for Concrete5 CMS
  • How to setup a MariaDB database and user for Concrete5
  • How to install and configure Concrete5 CMS

Read more

Installing Apache on AlmaLinux

How to install Apache on AlmaLinux

Apache is one of the most popular and longstanding HTTP servers. It’s an open-source and cross-platform web server software developed and maintained by Apache Software Foundation. It’s easy to set up and learn to use, which has led to its widespread adoption for small and large scale websites.

In this guide, we’ll go over the step by step instructions to install Apache on AlmaLinux. Feel free to follow along with us, whether you have a fresh AlmaLinux installation or have migrated from CentOS to AlmaLinux.

In this tutorial you will learn:

  • How to install Apache web server on AlmaLinux
  • How to control Apache web server with systemctl commands
  • How to open firewall for HTTP (port 80) and HTTPS (port 443)
  • How to host a website with Apache
  • How to install SSL certificate with Let’s Encrypt
Installing Apache on AlmaLinux

Installing Apache on AlmaLinux

Read more

LAMP stack running successfully on AlmaLinux

How to install LAMP stack on AlmaLinux

A LAMP stack is an assortment of software that contains everything you need in order to serve a website, show dynamic content, and store or retrieve data from a database. The software is all within the LAMP acronym, namely the Linux operating system, Apache web server, MySQL database (or MariaDB alternatively), and PHP programming language.

If you’ve installed AlmaLinux or migrated from CentOS to AlmaLinux, then you already have the first requirement done. Next, you just need to get your LAMP stack up and running. In this guide, we’ll show the step by step instructions to install a LAMP stack on AlmaLinux.

In this tutorial you will learn:

  • How to install all LAMP prerequisite packages on AlmaLinux
  • How to secure MariaDB database
  • How to start httpd and MariaDB services
  • How to open HTTP and HTTPS firewall ports
LAMP stack running successfully on AlmaLinux

LAMP stack running successfully on AlmaLinux

Read more

Installing Apache on Ubuntu 20.04

How to install Apache on Ubuntu 20.04

Apache is one of the most popular and longstanding HTTP servers. It’s an open-source and cross-platform web server software developed and maintained by Apache Software Foundation. It’s easy to set up and learn to use, which has led to its widespread adoption for small and large scale websites.

In this guide, we’ll go over the step by step instructions to install Apache on Ubuntu 20.04 Focal Fossa.

In this tutorial you will learn:

  • How to install Apache web server on Ubuntu 20.04
  • How to control Apache web server with systemctl commands
  • How to open firewall for HTTP (port 80) and HTTPS (port 443)
  • How to host a website with Apache
  • How to install SSL certificate with Let’s Encrypt

Read more

Create redirect and rewrite rules into .htaccess on Apache webserver

Create redirect and rewrite rules into .htaccess on Apache webserver

When using the Apache web server, .htaccess files (also called “distributed configuration files”) are used to specify configuration on a per-directory basis, or more generally to modify the behavior of the Apache web server without having to access virtual hosts files directly (this is usually impossible for example, on shared hosts). In this tutorial we see how we can establish URL redirections and rewriting rules inside .htaccess files.

In this tutorial you will learn:

  • How .htaccess files work
  • How to setup URL rewriting rules in .htaccess files using the RewriteRule directive
  • How to setup URL redirection rules in .htaccess files using the Redirect and RedirectMatch directives

Read more

kimai time tracker installation docker

Kimai – Time Trakcer installation deployment using Docker

About

Kimai is a free open source timetracker. It tracks the time you spend with various pre-set projects and prints out a summary of your activities on demand. The automated docker Kimai time tracker image “linuxconfig/kimai” can be used to instantly deploy the Kimai time tracker on your docker hosts.

kimai time tracker installation docker

Configuration

The Kimai runs on Debian GNU/Linux system featuring Apache web server, MariaDB ( MySQL ), database and PHP5. After creating a docker container based on “linuxconfig/kimai” docker image, a port 80 will be exposed which can be access on the docker host for an immediate Kimai web configuration/installation as well as later access.

Configured MySQL users:passwords:

  • root:”empty password”
  • admin:”pass”

Configured MySQL databases:

  • kimai

Exposed ports:

  • 80

Deployment

The below command can be used to download and create a new docker container called kimai and link your docker host system’s port 80 with container’s exposed port 80.

# docker run -d --name=kimai -p 80:80 linuxconfig/kimai

Read more

How to extract unique IP addresses from the apache log file on Linux

Question

How do I extract all IP addresses from my httpd log. I need to extract only unique IP addresses from my apache log file.

Here is a my sample apache log entry:

XXX.64.70.XXX - - [26/Mar/2011:00:28:23 -0700] "GET / HTTP/1.1" 403 4609 
"-" "Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.16 (KHTML, like 
Gecko) Chrome/10.0.648.204 Safari/534.16"

Read more