Book Image

CentOS 7 Server Deployment Cookbook

By : Timothy Boronczyk, IRAKLI NADAREISHVILI
Book Image

CentOS 7 Server Deployment Cookbook

By: Timothy Boronczyk, IRAKLI NADAREISHVILI

Overview of this book

CentOS is derived from Red Hat Enterprise Linux (RHEL) sources and is widely used as a Linux server. This book will help you to better configure and manage Linux servers in varying scenarios and business requirements. Starting with installing CentOS, this book will walk you through the networking aspects of CentOS. You will then learn how to manage users and their permissions, software installs, disks, filesystems, and so on. You’ll then see how to secure connection to remotely access a desktop and work with databases. Toward the end, you will find out how to manage DNS, e-mails, web servers, and more. You will also learn to detect threats by monitoring network intrusion. Finally, the book will cover virtualization techniques that will help you make the most of CentOS.
Table of Contents (18 chapters)
CentOS 7 Server Deployment Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface

Enabling overrides and performing URL rewriting


This recipe teaches you how to use mod_rewrite. I mentioned mod_rewrite earlier; it is a module for Apache that allows us to modify the URL and resolve it to different resources. There are many reasons one would want to do this. For example, perhaps you moved some files and their URL changed, but you don't want any links that exist elsewhere still pointing to the old destinations to be broken. You can write a rewrite rule that matches the old locations and updates the URL on the fly to successfully satisfy the request. Another example is SEO; you may have long, unfriendly canonical URLs for a resource but want something shorter and more memorable. The friendly URLs can be mapped to the canonical URL behind the scenes.

Getting ready

This recipe requires a CentOS system with a working network connection. It assumes that the system is configured with the IP address 192.168.56.100 and is running Apache as described in the previous recipes. Administrative...