Book Image

Mastering Linux Network Administration

By : Jay LaCroix
Book Image

Mastering Linux Network Administration

By: Jay LaCroix

Overview of this book

Linux is everywhere. Whether you run a home office, a small business, or manage enterprise systems, Linux can empower your network to perform at its very best. Armed with the advanced tools and best practice guidance of this practical guide, you'll be able to mold Linux networks to your will, empowering your systems and their users to take advantage of all that Linux-based networks have to offer. Understand how Linux networks function and get to grips with essential tips and tricks to manage them - whether you're already managing a networks, or even just starting out. With Debian and CentOS as its source, this book will divulge all the details you need to manage a real Linux-based network. With detailed activities and instructions based on real-world scenarios, this book will be your guide to the exciting world of Linux networking.
Table of Contents (17 chapters)
Mastering Linux Network Administration
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Setting up virtual hosts


It's very common for a single organization to host multiple sites. Each of these sites can live on their own server or virtual machine, but that's not very practical. Running just one site per server is very expensive and not very efficient. The concept of virtual hosts is that multiple sites can live on one web server, which saves infrastructure. Of course, it's always possible that you may have a website that generates so much traffic that sharing it with other high-traffic sites may not be a good idea, but when this is not the case, virtual hosts are recommended.

As mentioned before, /var/www is the default location where Apache looks for files to serve. If you're hosting multiple sites on one server, you would want to create a separate directory for each of them. For example, if you are hosting a website for a company named tryadtech.com and another for linuxpros.com, you could create the following directory structure:

/var/www/tryadtech.com/html
/var/www/linuxpros...