Tag: Apache

Get Real Client IP from Cloudflare and pass to Apache or PHP using CF-Connecting-IP and Apache mod

How to Get the Real Client IP Address from Cloudflare in Apache or PHP

In this article we will learn how to get the real client IP from Cloudlfare (CF-Connecting-IP) and pass it on to PHP or Apache with mod_remoteip.

Introduction Cloudflare is great as a quick-and-easy CDN and DDoS protection, but one downside is that the IP address seen by your web server will be that of the Clouflare proxy and not the actual client. This can be a big security issue because your Apache access and error logs will only show the IP…

Continue reading How to Get the Real Client IP Address from Cloudflare in Apache or PHP

How to Run Multiple PHP Versions with Apache on Ubuntu 18.04 / 16.04

How to Run Multiple PHP Versions with Apache on Ubuntu 18.04 / 16.04

In this guide we will configure Apache to run PHP 7.x and PHP 5.6 simultaneously, and choose between them using Virtual Hosts or .htaccess.

Prerequisites You should already have Apache installed and serving web pages before following this guide. This guide was tested on Ubuntu 16.04 and Ubuntu 18.04, though it should also be useful for other Debian-based systems. If you need to install Apache on Ubuntu, please see: Installing Apache on Ubuntu 18.04 with Virtual Hosts Installing Apache…

Continue reading How to Run Multiple PHP Versions with Apache on Ubuntu 18.04 / 16.04

Let’s Encrypt Error: “Client with the currently selected authenticator does not support any combination of challenges that will satisfy the CA.”

Renewing an existing certificate Performing the following challenges: Client with the currently selected authenticator does not support any combination of challenges that will satisfy the CA. Attempting to renew cert (example.com) from /etc/letsencrypt/renewal/example.com.conf produced an unexpected error: Client with the currently selected authenticator does not support any combination of challenges that will satisfy the CA..…

Continue reading Let’s Encrypt Error: “Client with the currently selected authenticator does not support any combination of challenges that will satisfy the CA.”

Configuring Let’s Encrypt SSL Cert on Apache and Ubuntu 18.04

Configuring Let’s Encrypt SSL Cert for Apache on Ubuntu 18.04

Let’s Encrypt is a certificate authority that provides free SSL certificates that are just as secure as current paid certificates. In this guide we will configure an SSL certificate for Apache on Ubuntu 18.04.

Prerequisites You should be using a non-root user with sudo privileges as explained in Ubuntu 18.04 Initial Server Setup. You should also have Apache already installed and serving web pages before continuing with this guide. Please see Installing Apache on Ubuntu 18.04. Cloudflare Users: Note that you may not need Let’s Encrypt and can instead use…

Continue reading Configuring Let’s Encrypt SSL Cert for Apache on Ubuntu 18.04

Installing Apache, MySQL, PHP (LAMP) stack on Ubuntu 18.04

Installing Apache, MySQL, PHP (LAMP) Stack on Ubuntu 18.04

Ubuntu Server 18.04 LTS (Bionic Beaver) is finally here and is being rolled out across VPS hosts such as DigitalOcean and AWS. In this guide we will install a LAMP Stack (Apache, MySQL, PHP) and configure a web server.

Video Tutorial

Prerequisites You should use a non-root user account with sudo privileges. Please see the Initial server setup for Ubuntu 18.04 guide for more details. 1. Install Apache Let’s begin by updating the package lists and installing Apache on Ubuntu 18.04. Below we have two commands separated by &&. The first command will update the package lists to ensure you get…

Continue reading Installing Apache, MySQL, PHP (LAMP) Stack on Ubuntu 18.04

Installing Apache on Ubuntu 18.04 Server with Virtual Hosts

Installing Apache on Ubuntu 18.04 with Multiple Domains

Apache is the most widely-used web server in the world with approximately 45 percent of active sites running on it.  In this guide we will install and configure the Apache2 HTTP web server on Ubuntu 18.04 Server (Bionic Beaver). You can use this guide for a single domain website or multiple domains using Virtual Hosts.

Prerequisites You should use a non-root user account with sudo privileges. Please see the Initial server setup for Ubuntu 18.04 guide for more details. 1. Install Apache Let’s begin by updating the repositories and installing Apache. Press y and ENTER if prompted to install. sudo apt update && sudo apt install apache2 Installation may take a few minutes.…

Continue reading Installing Apache on Ubuntu 18.04 with Multiple Domains

Installing PHP for Apache on Ubuntu 18.04 Server

Installing PHP for Apache on Ubuntu 18.04 Server

In this guide we will install PHP 7 and configure it to work with the Apache web server on Ubuntu Server 18.04 (Bionic Beaver). The PHP Hypertext Preprocessor (PHP) is a programming language that allows web developers to create dynamic and interactive Web pages. As of 2018, PHP was used as the server-side programming language on 85% of 10 million most popular websites!

Video Tutorial

Prerequisites You should use a non-root user account as explained in the Ubuntu 18.04 Initial Server Setup. You should also have Apache already installed and be able to access a test web page in your browser as explained in our guide Installing Apache on Ubuntu 18.04 Server with Virtual Hosts. 1. Install PHP Let’s begin by…

Continue reading Installing PHP for Apache on Ubuntu 18.04 Server

Guide: Installing phpMyAdmin for Apache on Ubuntu 16.04 / 17.10

In this guide we will install and configure phpMyAdmin to work with Apache on Ubuntu 16.04 / 17.10. Prerequisites You should be using a non-root user with sudo privileges as explained in Ubuntu 16.04 / 17.10 Initial Server Setup. You should also have your LAMP stack (Apache, MySQL and PHP) already installed before continuing with…

Continue reading Guide: Installing phpMyAdmin for Apache on Ubuntu 16.04 / 17.10

Guide: Installing PHP for Apache (Ubuntu 16.04 / 17.10)

In this guide we will install and configure PHP for Apache on  Ubuntu 16.04 / 17.10. 1. Install PHP Let’s begin by updating the package lists. sudo apt-get update Now install PHP and associated packages. sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql 2. Configure Apache We will need to alter the dir.conf file to tell Apache…

Continue reading Guide: Installing PHP for Apache (Ubuntu 16.04 / 17.10)

How to Configure Let’s Encrypt SSL on Apache (Ubuntu 16.04 / 17.10)

In this guide we will configure Let’s Encrypt SSL on Apache (Ubuntu 16.04 / 17.10). Prerequisites You should be using a non-root user with sudo privileges as explained in Ubuntu 16.04 / 17.10 Initial Server Setup. You should also have Apache already installed and serving web pages before continuing with this guide. Please see Installing Apache on Ubuntu 16.04…

Continue reading How to Configure Let’s Encrypt SSL on Apache (Ubuntu 16.04 / 17.10)